:root {
    --ink: #0A1F3D;
    --ink-soft: #22406B;
    --marigold: #0A1F3D;
    --marigold-dark: #0A1F3D;
    --teal: #12335C;
    --teal-light: #EAF0F8;
    --paper: #FBF9F4;
    --paper-alt: #F3EFE4;
    --line: #E6E1D3;
    --white: #FFFFFF;
    --text-muted: #5B6478;
    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --shadow-soft: 0 12px 30px -14px rgba(20, 33, 61, 0.25);
    --shadow-hard: 0 20px 45px -18px rgba(20, 33, 61, 0.4);
    --nav-h: 66px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

img, svg, video {
    max-width: 100%;
    height: auto;
}

/* Centered auth card layout, used by login/register/forgot/reset/verify */
.auth-wrap {
    min-height: calc(100vh - var(--nav-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 26px;
}

.auth-card h1 {
    font-size: 22px;
    margin: 0 0 6px;
}

.auth-card .sub {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0 0 24px;
}

.field {
    margin-bottom: 5px;
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: var(--ink-soft);
    margin-bottom: 0px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--paper);
    font-size: 16px; /* 16px prevents iOS Safari auto-zoom on focus */
    color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--ink-soft);
    background: var(--white);
}

.btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    background: var(--marigold);
    color: var(--white);
    border: none;
    padding: 10px 16px;
    border-radius: 45px;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    background: var(--marigold-dark);
    opacity: 0.92;
    color: white;
}

.btnLogin {
    display: inline-block;
    width: 100%;
    text-align: center;
    background: var(--marigold);
    color: var(--white);
    border: none;
    padding: 10px 16px;
    border-radius: 45px;
    font-size: 13px;
    margin-top: 15px;
    font-weight: 400;
    cursor: pointer;
    text-decoration: none;
}

.btnLogin:hover {
    background: var(--marigold-dark);
    opacity: 0.92;
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}

.btn-outline:hover {
    background: var(--paper-alt);
}

.auth-links {
    margin-top: 18px;
    font-size: 13px;
    text-align: center;
    color: var(--text-muted);
}

.auth-links a {
    color: var(--ink-soft);
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover {
    text-decoration: underline;
}

.alert {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 18px;
}

.alert-error {
    background: #FBEAEA;
    color: #9B2C2C;
    border: 1px solid #F2C6C6;
}

.alert-success {
    background: #EAF6EE;
    color: #22703C;
    border: 1px solid #C7E9D2;
}

/* Dashboard */
.dash-wrap {
    padding: 3% 0%; 
}

.dash-header h1 {
    font-size: 24px;
    margin: 0 0 4px;
}

.dash-header .sub {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0 0 24px;
}

.tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    flex: 0 0 auto;
}

.tab-btn.active {
    color: var(--ink);
    border-bottom-color: var(--marigold);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-soft);
}

.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.listing-item {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 16px;
    min-width: 0; /* prevents grid children overflowing on narrow screens */
}

.listing-item h3 {
    margin: 0 0 6px;
    font-size: 15px;
}

.listing-item p {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 400;
    padding: 3px 10px;
    border-radius: 20px;
}

.badge-live {
    background: #EAF6EE;
    color: #22703C;
}

.badge-reviewing {
    background: var(--teal-light);
    color: var(--teal);
}

.otp-boxes {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.otp-boxes input {
    width: 44px;
    height: 52px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
}

#toastContainer {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: calc(100vw - 40px);
}

.toast {
    min-width: 260px;
    max-width: 360px;
    padding: 10px 18px;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.35);
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
    pointer-events: auto;
}

.toast-in {
    transform: translateX(0);
    opacity: 1;
}

.toast-out {
    transform: translateX(120%);
    opacity: 0;
}

.toast-success {
    background: #1f9d55;
}

.toast-error {
    background: #c0392b;
}

.btnLogin[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablets and small laptops */
@media (max-width: 900px) {
    .dash-wrap {
        padding: 24px 20px;
    }

    .listing-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* Tablets / large phones (portrait) */
@media (max-width: 768px) {
    .dash-wrap {
        padding: 20px 16px;
    }

    .dash-header h1 {
        font-size: 21px;
    }

    .card {
        padding: 18px;
    }

    .tab-btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    #toastContainer {
        top: 80px;
        right: 12px;
        left: 12px;
        align-items: flex-end;
    }
}

/* Phones */
@media (max-width: 480px) {
    .auth-wrap {
        padding: 16px 12px;
        align-items: flex-start;
        padding-top: 32px;
    }

    .auth-card {
        padding: 20px;
        border-radius: var(--radius-md);
    }

    .auth-card h1 {
        font-size: 19px;
    }

    .dash-wrap {
        padding: 16px 0px;
    }

    .dash-header h1 {
        font-size: 19px;
    }

    .dash-header .sub {
        font-size: 13px;
        margin-bottom: 18px;
    }

    .card {
        padding: 14px;
        border-radius: var(--radius-sm);
    }

    .listing-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .otp-boxes {
        gap: 8px;
    }

    .otp-boxes input {
        width: 40px;
        height: 48px;
        font-size: 18px;
    }

    #toastContainer {
        top: 70px;
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }

    .btn,
    .btnLogin {
        padding: 13px 16px; /* slightly taller tap target on touch screens */
    }
}

/* Very small phones */
@media (max-width: 360px) {
    .otp-boxes {
        gap: 6px;
    }

    .otp-boxes input {
        width: 34px;
        height: 44px;
        font-size: 16px;
    }

    .auth-card {
        padding: 16px;
    }
}