/* =========================================================
   Caseline Rev3 - Universal public/system page design
   Visual language derived from the modernized Default.aspx.
   ========================================================= */

:root {
    --cl-navy-950: #05294a;
    --cl-navy-900: #073763;
    --cl-blue-700: #0f4c81;
    --cl-blue-600: #1268b3;
    --cl-blue-300: #73c7ff;
    --cl-green-600: #4a9d2d;
    --cl-green-700: #3c8524;
    --cl-public-orange: #f7941d;
    --cl-public-orange-hover: #e67e00;
    --cl-public-orange-active: #cf7000;
    --cl-text: #10213f;
    --cl-text-muted: #667085;
    --cl-border: #d9e2ec;
    --cl-card: rgba(255,255,255,.97);
    --cl-shadow: 0 24px 60px rgba(7,55,99,.24);
    --cl-radius-xl: 20px;
    --cl-radius-md: 11px;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body.cl-public-page {
    margin: 0;
    color: var(--cl-text);
    background: #f6f8fb;
    font-family: "Lato", "Open Sans", "Segoe UI", Arial, sans-serif;
}

/* Header matches the modern Default.aspx treatment */
.cl-public-header {
    position: relative !important;
    height: 140px !important;
    background: #fff !important;
    box-shadow: 0 1px 0 rgba(16,33,63,.08);
    z-index: 10;
}

.cl-public-header .container {
    width: min(1180px, calc(100% - 40px));
    height: 100%;
    margin: 0 auto;
}

.cl-public-header .logo_container {
    position: relative !important;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 136px;
}

.cl-public-header #logo2 {
    display: block;
    max-height: 120px;
    width: auto;
    margin: 0 !important;
}

/* Hero */
.cl-public-hero {
    position: relative;
    min-height: calc(100vh - 215px);
    overflow: hidden;
    background: url("../../images/default_login/slide1.jpg") center center / cover no-repeat;
}

.cl-public-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(7,55,99,.98) 0%,
        rgba(7,55,99,.90) 34%,
        rgba(7,55,99,.63) 55%,
        rgba(7,55,99,.18) 100%
    );
}

.cl-public-layout {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 56px));
    min-height: calc(100vh - 215px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(380px, 1fr) minmax(430px, .9fr);
    gap: 72px;
    align-items: center;
    padding: 52px 0;
}

/* Left brand copy */
.cl-brand-panel { color: #fff; }

.cl-product-name {
    margin-bottom: 24px;
    color: #fff;
    font-size: clamp(38px, 4vw, 58px);
    font-weight: 900;
    letter-spacing: .025em;
}

.cl-product-name sup {
    position: relative;
    top: -.9em;
    font-size: 13px;
}

.cl-product-name span {
    margin-left: 8px;
    color: #ff5a4f;
    font-size: .38em;
    font-weight: 700;
    vertical-align: middle;
}

.cl-brand-rule {
    width: 48px;
    height: 4px;
    margin: 0 0 30px;
    border-radius: 999px;
    background: var(--cl-blue-300);
}

.cl-brand-panel h1 {
    max-width: 650px;
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(34px, 3.5vw, 52px);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -.035em;
}

.cl-brand-panel h2 {
    margin: 0 0 24px;
    color: var(--cl-blue-300);
    font-size: 24px;
    font-weight: 700;
}

.cl-brand-panel p {
    max-width: 570px;
    margin: 0;
    color: rgba(255,255,255,.9);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.72;
}

.cl-security-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 32px;
    padding: 11px 16px;
    border: 1px solid rgba(115,199,255,.72);
    border-radius: 999px;
    color: rgba(255,255,255,.95);
    background: rgba(7,55,99,.18);
    backdrop-filter: blur(8px);
    font-size: 14px;
    font-weight: 700;
}

.cl-shield {
    display: inline-grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border: 2px solid var(--cl-blue-300);
    border-radius: 45% 45% 52% 52%;
    color: var(--cl-blue-300);
    font-size: 13px;
    font-weight: 900;
}

/* Center/right system card */
.cl-card-wrap form { margin: 0; }

.cl-system-card {
    width: min(100%, 560px);
    margin-left: auto;
    padding: 42px 44px 38px;
    text-align: center;
    background: var(--cl-card);
    border: 1px solid rgba(255,255,255,.82);
    border-radius: var(--cl-radius-xl);
    box-shadow: var(--cl-shadow);
    backdrop-filter: blur(14px);
}

.cl-status-icon {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    margin: 0 auto 22px;
    border-radius: 50%;
    font-size: 36px;
    font-weight: 900;
}

.cl-status-icon--warning {
    color: var(--cl-green-600);
    background: #eef8ea;
    border: 1px solid #deeed7;
}

.cl-card-title {
    margin: 0;
    color: var(--cl-navy-900);
    font-size: clamp(30px, 3vw, 40px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -.035em;
}

.cl-card-accent {
    width: 70px;
    height: 3px;
    margin: 22px auto 26px;
    border-radius: 999px;
    background: var(--cl-green-600);
}

.cl-card-message {
    color: #172033;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.55;
}

.cl-card-message #lblMessage {
    display: block;
    color: inherit !important;
    font: inherit !important;
    font-weight: inherit !important;
}

.cl-card-help {
    max-width: 430px;
    margin: 18px auto 0;
    color: var(--cl-text-muted);
    font-size: 15px;
    line-height: 1.55;
}

.cl-card-divider {
    height: 1px;
    margin: 30px 0 24px;
    background: var(--cl-border);
}

.cl-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Single-action cards */
.cl-system-card--access-denied .cl-card-actions {
    grid-template-columns: 1fr;
}

.cl-system-card--access-denied .cl-button {
    width: 100%;
}

.cl-button {
    min-height: 56px;
    padding: 0 18px;
    border-radius: var(--cl-radius-md) !important;
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.cl-button:hover { transform: translateY(-1px); }
.cl-button:active { transform: translateY(0); }

.cl-button--primary {
    color: #fff !important;
    background: linear-gradient(135deg, var(--cl-public-orange), var(--cl-public-orange-hover)) !important;
    border: 1px solid var(--cl-public-orange-hover) !important;
    box-shadow: 0 10px 22px rgba(247,148,29,.24);
}

.cl-button--primary:hover {
    background: linear-gradient(135deg, #ffa52f, var(--cl-public-orange)) !important;
    border-color: var(--cl-public-orange) !important;
    box-shadow: 0 14px 26px rgba(247,148,29,.30);
}

.cl-button--primary:active {
    background: var(--cl-public-orange-active) !important;
    border-color: var(--cl-public-orange-active) !important;
    box-shadow: 0 6px 14px rgba(247,148,29,.20);
}

.cl-button--secondary {
    color: var(--cl-navy-900) !important;
    background: #fff !important;
    border: 1px solid #aab8c8 !important;
    box-shadow: none !important;
}

.cl-button--secondary:hover { background: #f8fafc !important; }

/* Compact footer used by modern login */
.cl-public-footer {
    min-height: 75px;
    display: flex;
    align-items: center;
    background: #fff;
    border-top: 1px solid rgba(16,33,63,.08);
}

.cl-footer-inner {
    width: min(1400px, calc(100% - 56px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 28px;
    color: var(--cl-text-muted);
    font-size: 14px;
}

.cl-footer-security,
.cl-footer-links,
.cl-footer-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cl-footer-meta { justify-content: center; }
.cl-footer-links { justify-content: flex-end; }

.cl-footer-meta > span,
.cl-footer-links > span {
    width: 1px;
    height: 24px;
    background: var(--cl-border);
}

.cl-footer-links a {
    color: var(--cl-text-muted);
    font-weight: 700;
    text-decoration: none;
}

.cl-footer-links a:hover { color: var(--cl-blue-600); }

.cl-shield--footer {
    width: 27px;
    height: 27px;
    border-color: var(--cl-blue-600);
    color: var(--cl-blue-600);
}

@media (max-width: 950px) {
    .cl-public-header { height: 120px !important; }
    .cl-public-header .logo_container { height: 116px; }
    .cl-public-header #logo2 { max-height: 108px; }

    .cl-public-hero { min-height: auto; }
    .cl-public-overlay {
        background: linear-gradient(180deg, rgba(7,55,99,.98), rgba(7,55,99,.72));
    }

    .cl-public-layout {
        width: min(100% - 32px, 600px);
        min-height: auto;
        display: block;
        padding: 40px 0 54px;
    }

    .cl-brand-panel { margin-bottom: 30px; }
    .cl-brand-panel h1 { font-size: 34px; }
    .cl-brand-panel p { font-size: 15px; }
    .cl-product-name { font-size: 42px; }

    .cl-system-card {
        width: 100%;
        margin: 0;
        padding: 34px 28px 30px;
    }

    .cl-footer-inner {
        width: min(100% - 32px, 650px);
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 10px;
        padding: 18px 0;
        text-align: center;
    }

    .cl-footer-links { justify-content: center; }
}

@media (max-width: 560px) {
    .cl-card-actions { grid-template-columns: 1fr; }
    .cl-brand-panel p { display: none; }
    .cl-security-pill { margin-top: 16px; }
    .cl-system-card { padding: 30px 20px 24px; }
    .cl-card-title { font-size: 30px; }
}

/* =========================================================
   Shared controls used by the remaining public/system pages
   ========================================================= */
.cl-form-stack {
    display: grid;
    gap: 18px;
    margin-top: 8px;
    text-align: left;
}

.cl-field label {
    display: block;
    margin: 0 0 7px;
    color: var(--cl-text);
    font-size: 13px;
    font-weight: 800;
}

.cl-input-wrap {
    position: relative;
}

.cl-input {
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    border: 1px solid #cfd8e3;
    border-radius: 10px;
    outline: none;
    background: #fff;
    color: var(--cl-text);
    font: inherit;
    font-size: 15px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.cl-input:focus {
    border-color: var(--cl-blue-600);
    box-shadow: 0 0 0 3px rgba(18,104,179,.13);
}

.cl-validator {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #c9302c;
    font-weight: 900;
}

.cl-form-message {
    display: block;
    margin: 0 0 16px;
    padding: 11px 13px;
    border-radius: 9px;
    background: #fff2f0;
    color: #a61b1b !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.45;
}

.cl-password-rules {
    margin: 20px 0 0;
    padding: 18px 20px;
    border: 1px solid #dde7f0;
    border-radius: 12px;
    background: #f7fafc;
    text-align: left;
}

.cl-password-rules h3 {
    margin: 0 0 10px;
    color: var(--cl-text);
    font-size: 14px;
    font-weight: 900;
}

.cl-password-rules ul {
    margin: 0;
    padding-left: 20px;
    color: var(--cl-text-muted);
    font-size: 13px;
    line-height: 1.65;
}

.cl-status-icon--danger {
    color: #b42318;
    background: #fff1ef;
    border: 1px solid #ffd9d4;
}

.cl-status-icon--info {
    color: var(--cl-blue-600);
    background: #edf6fd;
    border: 1px solid #d6ebfa;
}

.cl-system-card--wide {
    width: min(100%, 650px);
}

.cl-download-list {
    display: grid;
    gap: 11px;
    margin-top: 8px;
    text-align: left;
}

.cl-download-section-title {
    margin: 6px 0 2px;
    color: var(--cl-text-muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.cl-download-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 15px;
    border: 1px solid #dce5ee;
    border-radius: 10px;
    background: #fff;
    color: var(--cl-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.cl-download-link:hover {
    transform: translateY(-1px);
    border-color: #b9d8ef;
    box-shadow: 0 8px 18px rgba(7,55,99,.08);
}

.cl-download-meta {
    color: var(--cl-text-muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.cl-popup-page .cl-public-header,
.cl-popup-page .cl-public-footer {
    display: none;
}

.cl-popup-page .cl-public-hero,
.cl-popup-page .cl-public-layout {
    min-height: 100vh;
}

.cl-popup-page .cl-public-layout {
    grid-template-columns: 1fr;
    width: min(720px, calc(100% - 36px));
    padding: 30px 0;
}

.cl-popup-page .cl-brand-panel {
    display: none;
}

.cl-popup-page .cl-system-card {
    margin: 0 auto;
}

@media (max-width: 640px) {
    .cl-system-card--wide { width: 100%; }
    .cl-download-link { align-items: flex-start; }
    .cl-download-meta { white-space: normal; text-align: right; }
}


/* =========================================================
   Default.aspx / login-specific refinements
   ========================================================= */
.cl-login-card {
    max-width: 500px;
    padding-top: 38px;
}

.cl-login-eyebrow {
    margin-bottom: 9px;
    color: var(--cl-blue-600);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.cl-login-intro {
    display: block;
    margin-top: 0;
}

.cl-login-form {
    margin-top: 28px;
}

.cl-login-form .cl-field {
    text-align: left;
}

.cl-login-form .cl-input {
    min-height: 52px;
    padding: 12px 14px;
    font-size: 16px;
}

.cl-inline-error {
    display: block;
    margin-top: 7px;
    color: #b42318;
    font-size: 12px;
    font-weight: 700;
}

.cl-inline-error[hidden] {
    display: none;
}

.cl-login-utility-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -4px;
}

.cl-forgot-link {
    color: var(--cl-blue-600);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.cl-forgot-link:hover {
    color: var(--cl-navy-900);
    text-decoration: underline;
}

.cl-login-error {
    margin: 0;
    text-align: left;
}

.cl-login-submit {
    width: 100%;
    margin-top: 2px;
}

.cl-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    place-items: center;
    padding: 24px;
}

.cl-modal.is-open {
    display: grid;
}

.cl-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5,41,74,.58);
    backdrop-filter: blur(4px);
}

.cl-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 430px);
    padding: 34px 34px 30px;
    border: 1px solid rgba(255,255,255,.85);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(5,41,74,.32);
    text-align: center;
}

.cl-modal__close {
    position: absolute;
    top: 10px;
    right: 13px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--cl-text-muted);
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
}

.cl-modal__close:hover {
    background: #f3f6f9;
    color: var(--cl-navy-900);
}

.cl-modal__icon {
    width: 62px;
    height: 62px;
    margin-bottom: 17px;
    font-size: 27px;
}

.cl-modal__title {
    margin: 0;
    color: var(--cl-navy-900);
    font-size: 26px;
    font-weight: 900;
}

.cl-modal__message {
    margin: 15px 0 24px;
    color: var(--cl-text-muted);
    font-size: 15px;
    line-height: 1.6;
}

.cl-modal__button {
    width: 100%;
}

@media (prefers-reduced-motion: no-preference) {
    .cl-login-card {
        animation: cl-login-enter .35s ease-out both;
    }

    @keyframes cl-login-enter {
        from { opacity: 0; transform: translateY(8px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

@media (max-width: 560px) {
    .cl-login-card { padding: 28px 20px 24px; }
    .cl-login-form { margin-top: 22px; }
}
