.cag-shell,
.cag-shell * {
    box-sizing: border-box;
}

.cag-shell {
    width: min(100%, 1120px);
    margin: 36px auto;
    font-family: Arial, Helvetica, sans-serif;
    color: #f4f4f4;
}

.cag-login-shell,
.cag-static-expired {
    min-height: 520px;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 20% 10%, rgba(255,255,255,.07), transparent 32%),
        #050505;
    border: 1px solid #242424;
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(0,0,0,.48);
}

.cag-card,
.cag-expired-card {
    width: min(100%, 430px);
    padding: 32px;
    background: #090909;
    border: 1px solid #2b2b2b;
    border-radius: 20px;
    box-shadow: 0 24px 65px rgba(0,0,0,.55);
}

.cag-brand-mark {
    width: 46px;
    height: 6px;
    margin-bottom: 24px;
    border-radius: 999px;
    background: #fff222;
}

.cag-title,
.cag-expired-card h2,
.cag-placeholder-card h2 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 28px;
    line-height: 1.2;
}

.cag-subtitle,
.cag-expired-card p,
.cag-placeholder-card p {
    margin: 0 0 26px;
    color: #aaa;
    line-height: 1.65;
}

.cag-login-form {
    display: grid;
    gap: 18px;
}

.cag-field {
    display: grid;
    gap: 8px;
    color: #eaeaea;
    font-size: 14px;
    font-weight: 700;
}

.cag-field input {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid #343434;
    border-radius: 12px;
    outline: none;
    background: #050505;
    color: #fff;
    font-size: 16px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.cag-field input:focus {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255,255,255,.08);
}

.cag-primary-button,
.cag-secondary-button {
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 12px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, color .2s ease, opacity .2s ease;
}

.cag-primary-button {
    border: 0;
    background: #fff;
    color: #050505;
}

.cag-primary-button:hover,
.cag-secondary-button:hover {
    transform: translateY(-1px);
}

.cag-primary-button:disabled,
.cag-secondary-button:disabled {
    cursor: wait;
    opacity: .65;
    transform: none;
}

.cag-secondary-button {
    border: 1px solid #4a4a4a;
    background: #111;
    color: #fff;
}

.cag-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-decoration: none !important;
}

.cag-login-card .cag-secondary-button {
    width: 100%;
    margin-top: 12px;
}

.cag-alert {
    padding: 13px 14px;
    border-radius: 11px;
    font-size: 14px;
    line-height: 1.45;
}

.cag-alert-error {
    border: 1px solid #a33c3c;
    background: #311111;
    color: #ffb4b4;
}

.cag-alert-success {
    margin-bottom: 18px;
    border: 1px solid #247a45;
    background: #0d2a19;
    color: #9ff4bd;
}

.cag-protected-root {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    border: 1px solid #242424;
    border-radius: 22px;
    background: #050505;
    box-shadow: 0 24px 80px rgba(0,0,0,.48);
}

.cag-panel-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    border-bottom: 1px solid #242424;
    background: #090909;
}

.cag-panel-label {
    color: #fff222;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.cag-panel-user {
    margin-top: 4px;
    color: #fff;
    font-size: 14px;
}

.cag-secure-content {
    min-height: 480px;
    padding: 26px;
    transition: filter .16s ease, opacity .16s ease;
}

.cag-placeholder-card {
    max-width: 680px;
    padding: 28px;
    border: 1px solid #2f2f2f;
    border-radius: 18px;
    background: #0a0a0a;
}

.cag-verifying {
    position: absolute;
    z-index: 10;
    top: 82px;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 15px;
    transform: translateX(-50%);
    border: 1px solid #444;
    border-radius: 999px;
    background: rgba(10,10,10,.95);
    color: #fff;
    font-size: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,.4);
}

.cag-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #555;
    border-top-color: #fff;
    border-radius: 50%;
    animation: cag-spin .8s linear infinite;
}

@keyframes cag-spin {
    to { transform: rotate(360deg); }
}

.cag-protected-root.is-verifying .cag-secure-content,
.cag-protected-root.is-expired .cag-secure-content {
    filter: blur(12px);
    opacity: .16;
    pointer-events: none;
    user-select: none;
}

.cag-expired-overlay {
    position: absolute;
    z-index: 20;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(0,0,0,.84);
    backdrop-filter: blur(8px);
}

.cag-expired-overlay[hidden],
.cag-verifying[hidden],
.cag-alert[hidden] {
    display: none !important;
}

.cag-static-expired .cag-expired-card {
    text-align: center;
}

@media (max-width: 680px) {
    .cag-shell {
        margin: 18px auto;
    }

    .cag-login-shell,
    .cag-static-expired {
        min-height: 460px;
        padding: 14px;
        border-radius: 18px;
    }

    .cag-card,
    .cag-expired-card {
        padding: 24px;
    }

    .cag-panel-bar {
        align-items: flex-start;
        padding: 16px;
    }

    .cag-logout-button {
        min-height: 42px;
        padding: 9px 13px;
    }

    .cag-secure-content {
        padding: 16px;
    }
}

/* -------------------------------------------------------------------------
 * 1.2.1 — production theme isolation
 * Prevent WordPress themes/page builders from recoloring or reshaping the
 * login and protected panel controls. Article-specific styles remain owned
 * by Secure Knowledge Viewer.
 * ---------------------------------------------------------------------- */
html body .cag-shell,
html body .cag-shell * {
    box-sizing: border-box !important;
}

html body .cag-shell {
    width: min(100%, 1120px) !important;
    max-width: 1120px !important;
    margin: 36px auto !important;
    padding: 0 !important;
    color: #f4f4f4 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-style: normal !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    line-height: normal !important;
    isolation: isolate;
}

html body .cag-shell button,
html body .cag-shell input,
html body .cag-shell select,
html body .cag-shell textarea,
html body .cag-shell a {
    font-family: inherit !important;
    font-style: normal !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-shadow: none !important;
}

html body .cag-shell button,
html body .cag-shell input[type="button"],
html body .cag-shell input[type="submit"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: auto;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    box-shadow: none !important;
}

html body .cag-shell button::before,
html body .cag-shell button::after,
html body .cag-shell a::before,
html body .cag-shell a::after {
    content: none !important;
}

html body .cag-login-shell,
html body .cag-static-expired {
    display: grid !important;
    min-height: 520px !important;
    place-items: center !important;
    padding: 24px !important;
    border: 1px solid #242424 !important;
    border-radius: 24px !important;
    background: radial-gradient(circle at 20% 10%, rgba(255,255,255,.07), transparent 32%), #050505 !important;
    box-shadow: 0 24px 80px rgba(0,0,0,.48) !important;
}

html body .cag-card,
html body .cag-expired-card {
    width: min(100%, 430px) !important;
    max-width: 430px !important;
    padding: 32px !important;
    border: 1px solid #2b2b2b !important;
    border-radius: 20px !important;
    background: #090909 !important;
    box-shadow: 0 24px 65px rgba(0,0,0,.55) !important;
}

html body .cag-title,
html body .cag-expired-card h2,
html body .cag-placeholder-card h2 {
    margin: 0 0 10px !important;
    color: #fff !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

html body .cag-subtitle,
html body .cag-expired-card p,
html body .cag-placeholder-card p {
    margin: 0 0 26px !important;
    color: #aaa !important;
    line-height: 1.65 !important;
}

html body .cag-login-form {
    display: grid !important;
    gap: 18px !important;
    margin: 0 !important;
}

html body .cag-field {
    display: grid !important;
    gap: 8px !important;
    margin: 0 !important;
    color: #eaeaea !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

html body .cag-field input {
    display: block !important;
    width: 100% !important;
    min-height: 50px !important;
    margin: 0 !important;
    padding: 12px 14px !important;
    border: 1px solid #343434 !important;
    border-radius: 12px !important;
    outline: none !important;
    background: #050505 !important;
    color: #fff !important;
    font-size: 16px !important;
    box-shadow: none !important;
}

html body .cag-primary-button,
html body .cag-secondary-button,
html body .cag-logout-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 48px !important;
    padding: 12px 18px !important;
    border-radius: 12px !important;
    font: inherit !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

html body .cag-primary-button {
    border: 0 !important;
    background: #fff !important;
    color: #050505 !important;
}

html body .cag-secondary-button,
html body .cag-logout-button {
    border: 1px solid #4a4a4a !important;
    background: #111 !important;
    color: #fff !important;
}

html body .cag-link-button,
html body .cag-login-card .cag-secondary-button {
    width: 100% !important;
}

html body .cag-protected-root {
    position: relative !important;
    display: block !important;
    min-height: 560px !important;
    overflow: hidden !important;
    border: 1px solid #242424 !important;
    border-radius: 22px !important;
    background: #050505 !important;
    color: #f4f4f4 !important;
    box-shadow: 0 24px 80px rgba(0,0,0,.48) !important;
}

html body .cag-panel-bar {
    display: flex !important;
    min-height: 0 !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
    margin: 0 !important;
    padding: 18px 22px !important;
    border: 0 !important;
    border-bottom: 1px solid #242424 !important;
    border-radius: 0 !important;
    background: #090909 !important;
    color: #fff !important;
    box-shadow: none !important;
}

html body .cag-panel-label {
    margin: 0 !important;
    color: #fff222 !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    letter-spacing: .08em !important;
    line-height: 1.25 !important;
    text-transform: uppercase !important;
}

html body .cag-panel-user {
    margin: 4px 0 0 !important;
    color: #fff !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
}

html body .cag-secure-content {
    display: block !important;
    min-height: 480px !important;
    margin: 0 !important;
    padding: 26px !important;
    background: transparent !important;
}

@media (max-width: 680px) {
    html body .cag-shell { margin: 18px auto !important; }
    html body .cag-login-shell,
    html body .cag-static-expired { min-height: 460px !important; padding: 14px !important; border-radius: 18px !important; }
    html body .cag-card,
    html body .cag-expired-card { padding: 24px !important; }
    html body .cag-panel-bar { align-items: flex-start !important; padding: 16px !important; }
    html body .cag-secure-content { padding: 16px !important; }
}

/* =========================================================
 * Designer overrides — Minwave production UI
 * Version 1.2.2
 * ======================================================= */
html body .cag-shell {
    font-family: "roboto regular", Roboto, Arial, sans-serif !important;
    border-radius: 5px !important;
}

html body .cag-card {
    border-radius: 5px !important;
    box-shadow: -5px 5px 50px -50px #810000 !important;
}

html body .cag-brand-mark {
    display: none !important;
}

html body .cag-subtitle {
    font-family: "roboto light", Roboto, Arial, sans-serif !important;
    font-weight: 300 !important;
}

html body .cag-field {
    font-family: "roboto light", Roboto, Arial, sans-serif !important;
    font-weight: 300 !important;
}

html body .cag-field input {
    border-radius: 5px !important;
}

html body .cag-primary-button {
    margin-top: 24px !important;
    min-width: 170px !important;
    padding: 13px 18px !important;
    border-radius: 5px !important;
    border: 0 !important;
    background: linear-gradient(180deg, #FF0000 0%, #810000 100%) !important;
    color: #fff !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: background .28s ease, color .28s ease, transform .22s ease, box-shadow .28s ease !important;
}

html body .cag-primary-button:hover,
html body .cag-primary-button:focus-visible {
    background: #fff !important;
    color: #000 !important;
    box-shadow: 0 5px 50px -15px #fff !important;
}

