/* ==========================================================================
   IT MIS INFO — Authentication & Dashboard styles
   ========================================================================== */

/* Same font as the application shell: Tahoma for Latin, the Bengali faces
   behind it (see css/app.css). */

:root {
    --ink:        #0f172a;
    --ink-soft:   #475569;
    --ink-mute:   #94a3b8;
    --line:       #e2e8f0;
    --paper:      #ffffff;
    --canvas:     #f1f5f9;

    --brand-900:  #070d1f;
    --brand-800:  #0b1226;
    --brand-700:  #12204f;
    --brand-600:  #163372;

    --blue:       #2563eb;
    --blue-dark:  #1d4ed8;
    --indigo:     #4f46e5;
    --cyan:       #22d3ee;
    --cyan-soft:  #67e8f9;

    --ok:         #16a34a;
    --ok-bg:      #ecfdf5;
    --err:        #b91c1c;
    --err-bg:     #fef2f2;

    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;

    --shadow-card: 0 24px 60px -24px rgba(15, 23, 42, .28);
    --shadow-soft: 0 8px 24px -12px rgba(15, 23, 42, .22);

    --font: Tahoma, Verdana, "Noto Sans Bengali", "Hind Siliguri", system-ui,
            -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--blue); }

/* ==========================================================================
   Auth shell — split layout
   ========================================================================== */

.auth-body { background: var(--paper); }

.auth-shell {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    min-height: 100vh;
}

/* --------------------------------------------------------------------------
   Left: brand + devices
   -------------------------------------------------------------------------- */

.auth-brand {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(1100px 620px at 12% -8%, rgba(34, 211, 238, .20), transparent 62%),
        radial-gradient(900px 700px at 96% 108%, rgba(37, 99, 235, .38), transparent 60%),
        linear-gradient(140deg, var(--brand-900) 0%, var(--brand-700) 52%, var(--brand-600) 100%);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    padding: 26px 30px;
}

.brand-glow {
    position: absolute;
    right: -140px;
    top: -140px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(103, 232, 249, .30), transparent 68%);
    pointer-events: none;
}

.brand-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
    min-height: 0;
}

.brand-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 15px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(148, 197, 253, .30);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
    flex: none;
}

.brand-title {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.brand-title strong {
    font-size: 24px;
    letter-spacing: .6px;
    color: #fff;
}

.brand-title span {
    font-size: 12.5px;
    color: #93c5fd;
    letter-spacing: .3px;
}

.brand-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(24px, 2.7vw, 42px);
    line-height: 1.16;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.6px;
}

/* One line for the slogan where there is room for it. */
@media (min-width: 900px) {
    .brand-hero h1 { white-space: nowrap; }
}

.brand-hero h1 em {
    font-style: normal;
    background: linear-gradient(90deg, var(--cyan-soft), #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-hero p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.7;
    color: #b9c8e4;
    max-width: 46ch;
}

.brand-devices { margin-top: auto; min-height: 0; padding-top: 14px; }

/* Device grid ---------------------------------------------------------- */

.device-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.device-card {
    margin: 0;
    padding: 7px 5px 6px;
    border-radius: var(--r-md);
    background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .045));
    border: 1px solid rgba(165, 200, 255, .30);
    box-shadow:
        0 12px 26px -10px rgba(2, 8, 23, .55),
        inset 0 1px 0 rgba(255, 255, 255, .20);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    transition: transform .28s ease, background .28s ease, border-color .28s ease,
                box-shadow .28s ease;
}

.device-card:hover {
    transform: translateY(-5px);
    background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .08));
    border-color: rgba(103, 232, 249, .60);
    box-shadow:
        0 20px 36px -12px rgba(2, 8, 23, .65),
        inset 0 1px 0 rgba(255, 255, 255, .28);
}

.device-card svg {
    width: 100%;
    height: auto;
    max-height: 52px;
    display: block;
    /* the housings are light silver now, so they need a firm cast shadow
       to stay readable against the navy panel */
    filter: drop-shadow(0 10px 16px rgba(2, 8, 23, .60));
}

.device-card figcaption {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #e8eefc;
}

/* --------------------------------------------------------------------------
   Right: form column
   -------------------------------------------------------------------------- */

.auth-main {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 30px 40px 22px;
    background:
        radial-gradient(700px 420px at 100% 0%, rgba(37, 99, 235, .07), transparent 62%),
        var(--paper);
}

/* Language toggle — pinned to the true top-right corner ----------------- */

.lang-switch {
    position: absolute;
    top: 18px;
    right: 24px;
    z-index: 20;
    display: inline-flex;
    gap: 3px;
    padding: 4px;
    border-radius: 999px;
    background: var(--canvas);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.lang-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .3px;
    color: var(--ink-soft);
    text-decoration: none;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

.lang-option:hover {
    background: var(--paper);
    color: var(--blue-dark);
}

.lang-option.is-active {
    background: linear-gradient(135deg, var(--blue-dark), var(--indigo));
    color: #fff;
    box-shadow: 0 6px 14px -7px rgba(37, 99, 235, .95);
}

.auth-card {
    width: 100%;
    max-width: 434px;
}

/* Company brand above the sign-in card: the group name in big gradient
   letters with the KC mark sitting right underneath it. */
.company-brand {
    text-align: center;
    margin-bottom: 16px;
}

.company-name {
    margin: 12px 0 0;
    font-size: clamp(19px, 3vw, 24px);
    font-weight: 900;
    letter-spacing: 1.4px;
    line-height: 1.25;
    background: linear-gradient(115deg, #1e40af 5%, #2563eb 38%, #7c3aed 68%, #db2777 95%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.company-logo {
    width: 68px;
    height: 68px;
    border-radius: 17px;
    box-shadow: 0 16px 34px -14px rgba(37, 99, 235, .65);
}

.auth-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.auth-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--blue-dark), var(--indigo));
    box-shadow: 0 10px 22px -10px rgba(37, 99, 235, .85);
    flex: none;
    overflow: hidden;
}

/* Company logo instead of the generic monitor glyph. */
.auth-mark-logo { background: #fff; }
.auth-mark-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.auth-card-head h2 {
    margin: 0;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -.3px;
    color: var(--ink);
}

.auth-sub {
    margin: 4px 0 0;
    font-size: 13.5px;
    color: var(--ink-soft);
    line-height: 1.5;
}

/* Alerts --------------------------------------------------------------- */

.alert {
    border-radius: var(--r-sm);
    padding: 12px 15px;
    font-size: 13.5px;
    line-height: 1.6;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.alert ul { margin: 0; padding-left: 18px; }
.alert li + li { margin-top: 3px; }

.alert-success {
    background: var(--ok-bg);
    border-color: #a7f3d0;
    color: #065f46;
}

.alert-error {
    background: var(--err-bg);
    border-color: #fecaca;
    color: #991b1b;
}

/* Forms ---------------------------------------------------------------- */

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 7px; }

.field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}

.field-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.link-sm {
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    color: var(--blue);
}

.link-sm:hover { text-decoration: underline; }

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    width: 19px;
    height: 19px;
    color: var(--ink-mute);
    pointer-events: none;
    transition: color .2s ease;
}

.input {
    width: 100%;
    padding: 12.5px 14px 12.5px 44px;
    font-size: 14.5px;
    font-family: inherit;
    color: var(--ink);
    background: #f8fafc;
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    outline: none;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.input::placeholder { color: #a3aec1; }

.input:focus {
    background: #fff;
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .13);
}

.input:focus + .input-icon,
.input-wrap:focus-within .input-icon { color: var(--blue); }

.input.is-invalid { border-color: #ef4444; background: #fff5f5; }
.input.is-invalid:focus { box-shadow: 0 0 0 4px rgba(239, 68, 68, .14); }

.field-error {
    margin: 0;
    font-size: 12.5px;
    color: var(--err);
    font-weight: 500;
}

.field-hint {
    margin: 0;
    font-size: 12px;
    color: var(--ink-mute);
}

/* password reveal */
.toggle-pass {
    position: absolute;
    right: 8px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-mute);
    cursor: pointer;
    transition: color .2s ease, background .2s ease;
}

.toggle-pass:hover { color: var(--blue); background: rgba(37, 99, 235, .09); }
.toggle-pass svg { width: 19px; height: 19px; }
.input-password { padding-right: 48px; }

/* checkbox */
.check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13.5px;
    color: var(--ink-soft);
    cursor: pointer;
    user-select: none;
}

.check input {
    width: 16px;
    height: 16px;
    accent-color: var(--blue);
    cursor: pointer;
}

/* buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 20px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: transform .16s ease, box-shadow .22s ease, background .22s ease;
}

.btn svg { width: 19px; height: 19px; }

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--blue) 0%, var(--indigo) 100%);
    box-shadow: 0 12px 26px -12px rgba(37, 99, 235, .9);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px -14px rgba(37, 99, 235, .95);
}

.btn-primary:active { transform: translateY(0); }

.btn-ghost {
    background: rgba(255, 255, 255, .10);
    color: #e2e8f0;
    border: 1px solid rgba(148, 197, 253, .30);
    padding: 9px 16px;
    font-size: 13.5px;
    border-radius: 9px;
}

.btn-ghost:hover { background: rgba(255, 255, 255, .18); }

.auth-alt {
    margin: 4px 0 0;
    text-align: center;
    font-size: 13.5px;
    color: var(--ink-soft);
}

.auth-alt a { font-weight: 700; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }

/* OTP specific ---------------------------------------------------------- */

.input-wrap-center .input {
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 13px;
    text-indent: 13px;
    padding: 16px 14px;
    font-variant-numeric: tabular-nums;
}

.dest-note {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 11px 14px;
    font-size: 13.5px;
    color: var(--ink-soft);
    margin-bottom: 18px;
}

.dest-note strong { color: var(--ink); }
.dest-channel { color: var(--ink-mute); font-size: 12.5px; }

.dev-otp {
    position: relative;
    background: linear-gradient(135deg, #0b1226, #163372);
    border: 1px dashed rgba(103, 232, 249, .55);
    border-radius: var(--r-md);
    padding: 16px 18px 15px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #cbd5e1;
}

.dev-otp-tag {
    position: absolute;
    top: -9px;
    right: 14px;
    background: var(--cyan);
    color: #062032;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 1.4px;
    padding: 3px 9px;
    border-radius: 99px;
}

.dev-otp-label { font-size: 12.5px; color: #93c5fd; }

.dev-otp-value {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 9px;
    color: #fff;
    text-indent: 2px;
}

.dev-otp-hint { font-size: 11.5px; color: #7fa8dd; line-height: 1.5; }

/* credit footer --------------------------------------------------------- */

.auth-credit {
    margin-top: 30px;
    text-align: center;
    font-size: 13px;
    color: var(--ink-mute);
}

.auth-credit p { margin: 0; }

.auth-credit a {
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1.5px solid rgba(37, 99, 235, .35);
    transition: color .2s ease, border-color .2s ease;
}

.auth-credit a:hover {
    color: var(--indigo);
    border-color: var(--indigo);
}

/* ==========================================================================
   Dashboard
   ========================================================================== */

.dash-body {
    background:
        radial-gradient(900px 500px at 100% 0%, rgba(37, 99, 235, .07), transparent 60%),
        var(--canvas);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.dash-top {
    background: linear-gradient(120deg, var(--brand-900), var(--brand-700));
    border-bottom: 1px solid rgba(148, 197, 253, .18);
    position: sticky;
    top: 0;
    z-index: 20;
}

.dash-top-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 13px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.dash-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.dash-brand .brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

.dash-brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.dash-brand-text strong { color: #fff; font-size: 16px; letter-spacing: .5px; }
.dash-brand-text small  { color: #93c5fd; font-size: 11.5px; }

.dash-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #04202e;
    font-weight: 800;
    font-size: 17px;
    flex: none;
}

.dash-user-meta { display: flex; flex-direction: column; line-height: 1.3; }
.dash-user-meta strong { color: #fff; font-size: 14px; }
.dash-user-meta small  { color: #a9bfe0; font-size: 12px; }

.dash-main {
    flex: 1;
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 34px 26px 46px;
}

.dash-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    letter-spacing: -.5px;
}

.dash-hero h1 em {
    font-style: normal;
    background: linear-gradient(90deg, var(--blue), var(--indigo));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.dash-hero p { margin: 0; color: var(--ink-soft); font-size: 15px; }

.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    margin: 28px 0;
}

.dash-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 22px;
    box-shadow: var(--shadow-soft);
    transition: transform .2s ease, box-shadow .2s ease;
}

.dash-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }

.dash-card h3 {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--ink-mute);
}

.dash-card p {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    word-break: break-word;
}

.chip {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: 99px;
    letter-spacing: .3px;
}

.chip-ok    { background: var(--ok-bg); color: var(--ok); border: 1px solid #a7f3d0; }
.chip-muted { background: #f1f5f9; color: var(--ink-soft); border: 1px solid var(--line); }

.dash-next {
    background: linear-gradient(120deg, var(--brand-800), var(--brand-600));
    border-radius: var(--r-lg);
    padding: 28px 30px;
    color: #cbd5e1;
    box-shadow: var(--shadow-card);
}

.dash-next h2 { margin: 0 0 8px; color: #fff; font-size: 19px; }
.dash-next p  { margin: 0; font-size: 14.5px; line-height: 1.7; }

.dash-credit { margin-top: auto; padding: 6px 0 26px; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { padding: 34px 30px; }
    .auth-main  { padding: 40px 24px 30px; }
    .brand-devices { margin-top: 6px; }
    .device-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 640px) {
    .auth-brand { padding: 28px 20px; }
    .auth-main  { padding: 30px 18px 24px; }
    .device-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .device-card svg { max-height: 78px; }
    .brand-hero h1 { font-size: 26px; }
    .dash-user-meta { display: none; }
    .dash-top-inner { padding: 11px 16px; }
    .dash-main { padding: 26px 16px 38px; }
}

/* Short viewports: squeeze everything above the fold so the whole page —
   all twelve devices included — fits without scrolling. */
@media (max-height: 780px) {
    .auth-brand { padding: 16px 24px; }
    .brand-inner { gap: 10px; }
    .brand-hero p { display: none; }
    .device-grid { gap: 8px; }
    .device-card { padding: 8px 6px 6px; }
    .device-card svg { max-height: 46px; }
    .company-brand { margin-bottom: 8px; }
    .company-name { margin-bottom: 8px; }
    .company-logo { width: 54px; height: 54px; border-radius: 14px; }
    .auth-main { padding: 16px 40px 12px; }
    .auth-card-head { margin-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   Panel photo (login brand panel)
   The decorative flower-bud artwork, framed like a print and lifted
   off the navy panel with a violet halo.
   ========================================================================== */

.money-shot {
    position: relative;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 13px;
}

/* Soft halo bleeding out from behind the photo. */
.money-glow {
    position: absolute;
    left: 50%;
    top: 44%;
    width: 116%;
    height: 128%;
    translate: -50% -50%;
    border-radius: 50%;
    background: radial-gradient(closest-side,
                rgba(167, 139, 250, .42),
                rgba(34, 211, 238, .16) 56%, transparent 78%);
    filter: blur(16px);
    pointer-events: none;
}

/* Frosted print frame — a touch of tilt keeps it feeling physical.
   The frame hugs the photo, and the photo is sized from the available
   height so it stays big without ever overflowing the panel. */
.money-frame {
    position: relative;
    z-index: 1;
    max-width: 100%;
    padding: 10px;
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .07));
    border: 1px solid rgba(226, 232, 240, .40);
    box-shadow:
        0 34px 64px -24px rgba(2, 8, 23, .80),
        0 12px 28px -14px rgba(124, 58, 237, .50),
        inset 0 1px 0 rgba(255, 255, 255, .38);
    transform: rotate(-1.2deg);
    transition: transform .4s ease, box-shadow .4s ease;
}

.money-frame img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: min(66vh, 720px);
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(2, 8, 23, .38);
}

.money-shot:hover .money-frame {
    transform: rotate(0deg) translateY(-5px) scale(1.012);
    box-shadow:
        0 44px 78px -26px rgba(2, 8, 23, .85),
        0 16px 34px -14px rgba(34, 211, 238, .48),
        inset 0 1px 0 rgba(255, 255, 255, .45);
}

.money-caption {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .4px;
    color: #dbe7ff;
}

.money-caption-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a78bfa, #22d3ee);
    box-shadow: 0 0 0 4px rgba(167, 139, 250, .22);
    flex: none;
}

/* Small screens: keep the whole print visible. */
@media (max-width: 640px) {
    .money-frame { padding: 8px; border-radius: 18px; }
    .money-frame img { border-radius: 12px; }
}

/* Short viewports: tighten the spacing — the photo already sizes itself
   from the viewport height, so it fits without any cropping. */
@media (max-height: 780px) {
    .money-shot { gap: 9px; }
    .money-frame { padding: 8px; border-radius: 18px; }
}
