@import url('brand.css');

/* ===== 3RD EYE AUDIT LOGIN — full viewport, no scroll ===== */
:root {
    --dms-dark: var(--navy-900);
    --dms-btn: var(--navy-800);
    --dms-btn-hover: var(--navy-700);
    --dms-border: #c8cdd4;
    --dms-text: var(--text);
    --dms-muted: var(--text-muted);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #fff;
    color: var(--dms-text);
    height: 100%;
    overflow: hidden;
}

/* Single screen shell — hero + login + footer fit in 100vh */
.dms-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(12px, 2vh, 24px) clamp(20px, 3vw, 40px) clamp(10px, 1.5vh, 18px);
}

/* ===== MAIN: hero left + login right ===== */
.dms-main {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: clamp(16px, 2.5vw, 32px);
    align-items: center;
}

.dms-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    max-height: min(440px, 58vh);
    padding: clamp(20px, 3vh, 36px);
    background: linear-gradient(145deg, var(--navy-900) 0%, var(--navy-800) 100%);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(10, 22, 40, 0.18);
}

.dms-hero img {
    width: 100%;
    max-width: min(480px, 38vw);
    max-height: min(320px, 48vh);
    height: auto;
    object-fit: contain;
}

.dms-login {
    padding: 0 clamp(8px, 2vw, 24px);
    max-width: 420px;
    width: 100%;
    justify-self: center;
}

.dms-login-title {
    margin-bottom: clamp(14px, 2vh, 22px);
}

.dms-login-title h1 {
    font-size: clamp(1.75rem, 3.2vw, 2.35rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.05;
    color: var(--navy-900);
}

.dms-login-title p {
    font-size: clamp(0.88rem, 1.4vw, 0.98rem);
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== INPUT FIELDS ===== */
.dms-field {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--dms-border);
    margin-bottom: clamp(8px, 1.2vh, 11px);
    background: #fff;
    min-height: 42px;
}

.dms-field-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    flex-shrink: 0;
    color: var(--steel-500);
    font-size: 0.88rem;
    border-right: 1px solid var(--dms-border);
    background: #fafbfc;
}

.dms-field input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--dms-text);
    background: transparent;
    min-width: 0;
}

.dms-field input::placeholder { color: #9aa5b4; }
.dms-field input[readonly] { background: #f5f6f8; color: var(--dms-muted); }

.dms-field-otp,
.btn-send-otp {
    display: none !important;
}

.login-hint,
.otp-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: clamp(8px, 1.2vh, 12px);
    line-height: 1.4;
    text-align: center;
}

.login-hint strong,
.otp-hint strong { color: var(--text-light); font-weight: 600; }
.otp-hint.success { color: var(--success); }

.dms-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(10px, 1.5vh, 14px);
    font-size: 0.82rem;
}

.dms-save-id {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-light);
    cursor: pointer;
    user-select: none;
}

.dms-save-id input {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: var(--navy-700);
}

.dms-forgot {
    color: var(--navy-600);
    text-decoration: none;
    font-weight: 500;
}

.dms-forgot:hover { text-decoration: underline; }

.btn-login {
    width: 100%;
    padding: clamp(10px, 1.4vh, 12px);
    background: var(--navy-800);
    color: #fff;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 0.2s;
}

.btn-login:hover { background: var(--navy-700); }
.btn-login:disabled { opacity: 0.55; cursor: not-allowed; }

/* ===== BOTTOM: Excellence + Help Line ===== */
.dms-bottom {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: clamp(20px, 3vw, 36px);
    padding-top: clamp(12px, 1.8vh, 18px);
    margin-top: clamp(8px, 1vh, 12px);
    border-top: 1px solid var(--border);
}

.dms-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(0.88rem, 1.3vw, 0.98rem);
    font-weight: 700;
    margin-bottom: clamp(8px, 1.2vh, 11px);
    color: var(--navy-900);
}

.dms-section-title i {
    font-size: 0.82rem;
    color: var(--accent-gold);
}

.dms-notice-list { list-style: none; }

.dms-notice-list li {
    font-size: clamp(0.78rem, 1.1vw, 0.84rem);
    line-height: 1.45;
    color: var(--text-light);
    margin-bottom: clamp(4px, 0.6vh, 6px);
    padding-left: 12px;
    position: relative;
}

.dms-notice-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--navy-600);
}

.dms-helpline-desc {
    font-size: clamp(0.78rem, 1.1vw, 0.84rem);
    color: var(--text-light);
    line-height: 1.4;
    margin-bottom: clamp(8px, 1vh, 10px);
}

.dms-helpline-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.dms-helpline-card {
    border: 1px solid var(--dms-border);
    text-align: center;
    overflow: hidden;
}

.dms-helpline-card .phone {
    padding: clamp(8px, 1.2vh, 10px) 4px;
    font-size: clamp(0.78rem, 1.1vw, 0.86rem);
    font-weight: 700;
    color: var(--navy-900);
    background: #fff;
}

.dms-helpline-card .icon-bar {
    background: var(--navy-800);
    padding: clamp(7px, 1vh, 9px);
    color: var(--accent-gold-light);
    font-size: 0.88rem;
}

/* ===== COPYRIGHT FOOTER ===== */
.dms-copyright {
    flex-shrink: 0;
    text-align: center;
    padding: clamp(8px, 1.2vh, 12px) 0 0;
    margin-top: clamp(6px, 0.8vh, 10px);
    border-top: 1px solid var(--border);
}

.dms-copyright p {
    font-size: clamp(0.72rem, 1vw, 0.8rem);
    color: var(--text-muted);
    line-height: 1.45;
}

.dms-copyright strong {
    color: var(--navy-800);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.dms-copyright-sub {
    margin-top: 2px;
    font-size: clamp(0.68rem, 0.95vw, 0.74rem) !important;
    color: #94a3b8;
}

/* ===== TOAST ===== */
.toast-container { position: fixed; top: 16px; right: 16px; z-index: 3000; }
.toast {
    padding: 12px 18px;
    border-radius: var(--radius);
    font-size: 0.84rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    margin-bottom: 8px;
    animation: toastSlide 0.35s ease;
}
.toast-success { background: #edf7f2; border: 1px solid #b8dfd0; color: #145a3e; }
.toast-error { background: #fdf2f2; border: 1px solid #e8c4c4; color: #7f1d1d; }
@keyframes toastSlide { from { transform: translateX(80px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== RESPONSIVE — still try to avoid page scroll on tablet+ ===== */
@media (max-width: 960px) {
    html, body { overflow: hidden; }

    .dms-page {
        padding: 12px 16px 10px;
    }

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

    .dms-hero {
        max-height: min(360px, 50vh);
        padding: 16px;
    }

    .dms-hero img {
        max-width: 100%;
        max-height: min(260px, 42vh);
    }

    .dms-login {
        padding: 0 4px;
        max-width: none;
    }

    .dms-bottom {
        grid-template-columns: 1fr 1.2fr;
        gap: 16px;
    }
}

@media (max-width: 720px) {
    .dms-main {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .dms-hero {
        max-height: min(180px, 28vh);
    }

    .dms-hero img {
        max-height: min(140px, 22vh);
    }

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

    .dms-helpline-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-height: 640px) {
    .dms-login-title { margin-bottom: 10px; }
    .dms-field { min-height: 38px; margin-bottom: 6px; }
    .otp-hint { margin-bottom: 6px; font-size: 0.68rem; }
    .dms-options { margin-bottom: 8px; }
    .dms-notice-list li { margin-bottom: 3px; line-height: 1.35; }
}
