:root {
    color-scheme: light;
    --navy-950: #0b1220;
    --navy-900: #111827;
    --navy-800: #1f2937;
    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --blue-100: #dbeafe;
    --blue-50: #eff6ff;
    --green-500: #10b981;
    --red-600: #dc2626;
    --red-50: #fef2f2;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #fff;
    --shadow: 0 24px 70px rgba(15, 23, 42, .14);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--slate-100);
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 40px 24px;
    background:
        radial-gradient(circle at 12% 6%, rgba(59, 130, 246, .14), transparent 28rem),
        radial-gradient(circle at 90% 90%, rgba(148, 163, 184, .18), transparent 26rem),
        var(--slate-100);
    color: var(--navy-900);
    font: 400 16px/1.55 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a,
summary,
input {
    -webkit-tap-highlight-color: transparent;
}

button,
summary {
    cursor: pointer;
}

svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.page-shell {
    width: min(100%, 960px);
    margin: 0 auto;
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(203, 213, 225, .85);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.brand-header {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(420px, 1.2fr);
    gap: 44px;
    align-items: center;
    min-height: 260px;
    padding: 50px 56px;
    overflow: hidden;
    background:
        linear-gradient(115deg, rgba(37, 99, 235, .2), transparent 42%),
        var(--navy-900);
    color: var(--white);
}

.brand-header::before,
.brand-header::after {
    position: absolute;
    content: "";
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 50%;
}

.brand-header::before {
    width: 340px;
    height: 340px;
    top: -225px;
    right: -50px;
}

.brand-header::after {
    width: 210px;
    height: 210px;
    right: 185px;
    bottom: -170px;
}

.brand-intro,
.brand-lockup {
    position: relative;
    z-index: 1;
}

.eyebrow,
.section-kicker,
.status-label {
    display: inline-flex;
    align-items: center;
    color: #93c5fd;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.brand-intro h1 {
    margin: 8px 0 8px;
    font-size: clamp(32px, 5vw, 47px);
    line-height: 1.08;
    letter-spacing: -.04em;
}

.brand-intro p {
    max-width: 340px;
    margin: 0;
    color: #cbd5e1;
    font-size: 15px;
}

.brand-lockup {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 18px;
    background: rgba(255, 255, 255, .98);
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 20px;
    box-shadow: 0 18px 35px rgba(0, 0, 0, .22);
}

.brand-logo {
    display: grid;
    place-items: center;
    height: 86px;
    min-width: 0;
    padding: 8px 4px;
}

.brand-logo img {
    display: block;
    width: 100%;
    max-width: 190px;
    max-height: 68px;
    object-fit: contain;
}

.brand-logo--cotana img {
    max-width: 205px;
}

.brand-divider {
    width: 1px;
    height: 54px;
    background: var(--slate-200);
}

.content-panel {
    padding: 48px 56px 44px;
}

.auth-card {
    width: min(100%, 480px);
    margin: 0 auto;
}

.section-heading {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: start;
    margin-bottom: 30px;
}

.icon-badge,
.empty-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    color: var(--blue-600);
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    border-radius: 14px;
}

.icon-badge svg,
.empty-icon svg {
    width: 24px;
    height: 24px;
}

.section-kicker {
    color: var(--blue-600);
}

.section-heading h2,
.dashboard-heading h2 {
    margin: 3px 0 4px;
    font-size: 27px;
    line-height: 1.2;
    letter-spacing: -.025em;
}

.section-heading p,
.dashboard-heading p,
.empty-state p {
    margin: 0;
    color: var(--slate-500);
    font-size: 14px;
}

.field-group + .field-group {
    margin-top: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--slate-700);
    font-size: 13px;
    font-weight: 700;
}

.input-wrap {
    position: relative;
}

.input-wrap svg {
    position: absolute;
    top: 50%;
    left: 16px;
    width: 20px;
    height: 20px;
    color: var(--slate-500);
    transform: translateY(-50%);
    pointer-events: none;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    min-height: 52px;
    padding: 13px 16px 13px 48px;
    color: var(--navy-900);
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

input::placeholder {
    color: #94a3b8;
}

input[type="text"]:focus,
input[type="password"]:focus {
    background: var(--white);
    border-color: var(--blue-500);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .12);
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 20px;
    border-radius: 12px;
    font-weight: 750;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.primary-button {
    width: 100%;
    margin-top: 24px;
    color: var(--white);
    background: var(--blue-600);
    border: 1px solid var(--blue-600);
    box-shadow: 0 9px 20px rgba(37, 99, 235, .25);
}

.primary-button svg {
    width: 19px;
    height: 19px;
}

.primary-button:hover {
    background: #1d4ed8;
    box-shadow: 0 12px 25px rgba(37, 99, 235, .32);
    transform: translateY(-1px);
}

.secondary-button {
    min-height: 42px;
    color: var(--slate-600);
    background: var(--white);
    border: 1px solid var(--slate-200);
}

.secondary-button svg {
    width: 18px;
    height: 18px;
}

.secondary-button:hover {
    color: var(--navy-900);
    background: var(--slate-50);
    border-color: var(--slate-300);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
summary:focus-visible,
.pagination a:focus-visible {
    outline: 3px solid rgba(59, 130, 246, .3);
    outline-offset: 3px;
}

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 20px 0 0;
    color: var(--slate-500);
    font-size: 12px;
}

.security-note svg {
    width: 16px;
    height: 16px;
    color: var(--green-500);
}

.error {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 18px 0 0;
    padding: 11px 13px;
    color: var(--red-600);
    background: var(--red-50);
    border: 1px solid #fecaca;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 650;
}

.error svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.dashboard-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.status-label {
    gap: 7px;
    color: var(--green-500);
}

.status-label span {
    width: 7px;
    height: 7px;
    background: currentColor;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, .12);
}

.dashboard-heading h2 {
    font-size: 30px;
}

.sms-list {
    display: grid;
    gap: 12px;
}

.sms-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 15px;
    padding: 19px 20px;
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.sms-item:hover {
    border-color: var(--slate-300);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .07);
    transform: translateY(-1px);
}

.sms-item--latest {
    background: linear-gradient(100deg, var(--blue-50), var(--white) 54%);
    border-color: var(--blue-100);
}

.message-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--slate-600);
    background: var(--slate-100);
    border-radius: 12px;
}

.sms-item--latest .message-icon {
    color: var(--blue-600);
    background: var(--blue-100);
}

.message-icon svg {
    width: 21px;
    height: 21px;
}

.message-content {
    min-width: 0;
}

.sms-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 12px;
    margin-bottom: 7px;
    color: var(--slate-500);
    font-size: 12px;
}

.sender {
    color: var(--slate-700);
    font-weight: 700;
}

.new-badge {
    padding: 2px 8px;
    color: var(--blue-600);
    background: var(--blue-100);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.sms-text {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--navy-800);
    font-size: 15px;
    line-height: 1.55;
}

details {
    margin-top: 16px;
}

summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px;
    color: var(--blue-600);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 750;
    list-style: none;
}

summary::-webkit-details-marker {
    display: none;
}

summary:hover {
    background: var(--blue-50);
}

summary svg {
    width: 17px;
    height: 17px;
    transition: transform .2s ease;
}

details[open] summary svg {
    transform: rotate(180deg);
}

.sms-list--older {
    margin-top: 12px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    display: grid;
    place-items: center;
    min-width: 38px;
    min-height: 38px;
    padding: 6px 10px;
    color: var(--slate-600);
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.pagination a:hover {
    color: var(--blue-600);
    border-color: var(--blue-500);
}

.pagination .current {
    color: var(--white);
    background: var(--blue-600);
    border-color: var(--blue-600);
}

.empty-state {
    padding: 48px 24px;
    text-align: center;
    background: var(--slate-50);
    border: 1px dashed var(--slate-300);
    border-radius: 18px;
}

.empty-icon {
    margin: 0 auto 15px;
}

.empty-state h3 {
    margin: 0 0 4px;
    font-size: 18px;
}

footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 56px;
    color: var(--slate-500);
    background: var(--slate-50);
    border-top: 1px solid var(--slate-200);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .04em;
}

footer span:first-child {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--slate-700);
}

footer i {
    width: 3px;
    height: 3px;
    background: var(--blue-500);
    border-radius: 50%;
}

@media (max-width: 760px) {
    body {
        padding: 18px;
    }

    .page-shell {
        border-radius: 22px;
    }

    .brand-header {
        grid-template-columns: 1fr;
        gap: 30px;
        min-height: auto;
        padding: 38px 32px;
        text-align: center;
    }

    .brand-intro p {
        margin-inline: auto;
    }

    .brand-lockup {
        width: min(100%, 470px);
        margin: 0 auto;
    }

    .content-panel {
        padding: 38px 32px 36px;
    }

    footer {
        padding: 17px 32px;
    }
}

@media (max-width: 520px) {
    body {
        padding: 0;
        background: var(--white);
    }

    .page-shell {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .brand-header {
        gap: 24px;
        padding: 32px 20px 28px;
    }

    .brand-intro h1 {
        font-size: 34px;
    }

    .brand-intro p {
        font-size: 14px;
    }

    .brand-lockup {
        grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
        border-radius: 15px;
    }

    .brand-logo {
        height: 67px;
        padding: 5px 2px;
    }

    .brand-divider {
        height: 38px;
    }

    .content-panel {
        padding: 32px 20px;
    }

    .section-heading {
        gap: 12px;
    }

    .icon-badge {
        width: 43px;
        height: 43px;
    }

    .section-heading h2,
    .dashboard-heading h2 {
        font-size: 24px;
    }

    .dashboard-heading {
        align-items: flex-start;
    }

    .secondary-button {
        width: 42px;
        min-height: 42px;
        padding: 0;
        overflow: hidden;
        font-size: 0;
    }

    .sms-item {
        gap: 12px;
        padding: 16px;
    }

    .message-icon {
        width: 38px;
        height: 38px;
    }

    footer {
        padding: 16px 20px;
    }

    footer span:last-child {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
