:root {
    --bg: #497aac;
    --card: #f5f5f5;
    --text: #222;
    --muted: #555;
    --brand-1: #497aac;
    --brand-2: #7dc58b;
    --brand-3: #dd7d2a;
    --accent: #497aac;
    --error: #ff6b6b;
    --ring: rgba(73, 122, 172, .3);
    --shadow: rgba(0, 0, 0, .25);
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
    color: var(--text);
    background: linear-gradient(180deg, var(--bg) 0%, #365c82 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    display: grid;
    grid-template-columns: 1fr 360px;
    /* reduced right card width */
    width: min(96vw, 900px);
    /* slightly smaller overall */
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    box-shadow: 0 16px 40px var(--shadow);
    overflow: hidden;
}

/* Left side info */
.info {
    padding: 32px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: fadeInLeft 1s ease;
}

.info h2 {
    font-size: 24px;
    margin: 0 0 14px;
    font-weight: 700;
}

.info p {
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 16px;
    max-width: 420px
}

.info ul {
    margin: 0;
    padding-left: 18px;
    font-size: 14px;
    line-height: 1.5;
}

.info li {
    margin-bottom: 6px;
}

/* Login Card */
.card {
    background: var(--card);
    padding: 24px;
    /* reduced padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: fadeInRight 1s ease;
    max-width: 360px;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 14px;
}

.brand img {
    width: 160px;
    height: auto;
    border-radius: 5px;
    animation: float 4.8s ease-in-out infinite;
}

.brand p {
    font-size: 13px;
    margin: 6px 0 0 0;
    color: var(--muted)
}

form {
    display: grid;
    gap: 10px;
    margin-top: 10px
}

.field {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
}

.field .icon {
    position: absolute;
    top: 45%;
    left: 12px;
    width: 18px;
    height: 18px;
    color: #6c757d;
    transform: translateY(-50%);
    pointer-events: none;
}

.field .form-group {
    margin: 0;
}

.field .form-group input {
    width: 100%;
    padding: 10px 12px 10px 40px; /* push text away from icon */
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field .form-group input:focus {
    border-color: #497aac; /* brand color */
    box-shadow: 0 0 0 0.2rem rgba(73, 122, 172, 0.25);
    outline: none;
}

/* Error styling */
.field .form-group input.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.field .invalid-feedback,.invalid-feedback {
    color: #dc3545;
    font-size: 13px;
    margin-top: 4px;
}

.field:has(.is-invalid) .icon {
  top: 32%; /* only when input is invalid */
}

.btn-theme {
    height: 40px;
    border: 0;
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    background: linear-gradient(90deg, var(--brand-1), var(--brand-2), var(--brand-3));
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
    transition: all 1s ease; /* smooth hover effect */
}

.btn-theme:hover {
    background: linear-gradient(90deg, var(--brand-3), var(--brand-2), var(--brand-1)); /* reverse gradient */
    transform: translateY(-2px); /* lift effect */
    box-shadow: 0 8px 20px rgba(0, 0, 0, .45);
}


.btn-theme:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.error {
    font-size: 12px;
    color: var(--error);
    display: none;
    margin-top: 4px
}

.hint {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px
}

.footer {
    text-align: center;
    margin-top: 12px;
    font-size: 11px;
    color: var(--muted)
}

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, .3);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: spin 1s linear infinite;
    vertical-align: -2px;
}

.btn-link{
  cursor: pointer;
  color: var(--brand-1);
  font-weight: 500;
  text-decoration: none;
}
.btn-link:hover{
  color: var(--brand-3);
}

/* Make Phone input div 100%*/
.iti {
  width: 100%;
}

.d-none {
  display: none !important;
}

.alert {
  position: relative;
  padding: 0.4rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  font-size: 0.7rem;
}

.alert-heading {
  color: inherit;
}

.alert-link {
  font-weight: 700;
}

.alert-dismissible {
  padding-right: 4rem;
}

.alert-dismissible .close {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.75rem 1.25rem;
  color: inherit;
}

.alert-primary {
  color: #004085;
  background-color: #cce5ff;
  border-color: #b8daff;
}

.alert-primary hr {
  border-top-color: #9fcdff;
}

.alert-primary .alert-link {
  color: #002752;
}

.alert-secondary {
  color: #383d41;
  background-color: #e2e3e5;
  border-color: #d6d8db;
}

.alert-secondary hr {
  border-top-color: #c8cbcf;
}

.alert-secondary .alert-link {
  color: #202326;
}

.alert-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.alert-success hr {
  border-top-color: #b1dfbb;
}

.alert-success .alert-link {
  color: #0b2e13;
}

.alert-info {
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: #bee5eb;
}

.alert-info hr {
  border-top-color: #abdde5;
}

.alert-info .alert-link {
  color: #062c33;
}

.alert-warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeeba;
}

.alert-warning hr {
  border-top-color: #ffe8a1;
}

.alert-warning .alert-link {
  color: #533f03;
}

.alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.alert-danger hr {
  border-top-color: #f1b0b7;
}

.alert-danger .alert-link {
  color: #491217;
}


@keyframes float {
    0% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-5px)
    }

    100% {
        transform: translateY(0)
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px)
    }

    to {
        opacity: 1;
        transform: translateX(0)
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px)
    }

    to {
        opacity: 1;
        transform: translateX(0)
    }
}

@media (max-width: 820px) {
    .container {
        display: block;
        /* single column */
        grid-template-columns: none;
        width: 92vw;
        max-width: 400px;
        background: transparent;
        box-shadow: none;
    }

    .info {
        display: none;
    }

    /* <-- the key fixes */
    .card {
        max-width: none;
        /* remove 360px cap */
        width: 100%;
        /* stretch to container */
        border-radius: 16px;
        /* keep nice corners */
        box-shadow: 0 16px 40px var(--shadow);
    }

}