/* MSKCreations Brand Theme v2 — Premium Redesign (Dark Slate & Indigo) */
:root {
    --primary: #0F0F13;
    --primary-light: #1A1C20;
    --accent: #6366F1;
    --accent-light: rgba(99, 102, 241, 0.12);
    --accent-mid: rgba(99, 102, 241, 0.06);
    --accent-hover: #4F46E5;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --neutral: #6B7280;
    --muted: #4B5563;
    --text: #F9FAFB;
    --text-secondary: #D1D5DB;
    --bg: #1A1C20;
    --bg-card: #1A1C20;
    --bg-light: #0F0F13;
    --bg-dark: #0A0A0E;
    --border: #2C2F3A;
    --border-light: rgba(99, 102, 241, 0.25);
    --success: #10B981;
    --success-bg: rgba(16, 185, 129, 0.08);
    --success-border: rgba(16, 185, 129, 0.2);
    --warning: #F59E0B;
    --warning-bg: rgba(245, 158, 11, 0.08);
    --radius: 8px;
    --radius-lg: 14px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 4px 24px rgba(99, 102, 241, 0.1);
    --font-heading: 'Plus Jakarta Sans', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--text);
    line-height: 1.65;
    background: var(--bg-light);
    background-image:
        radial-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
    padding: 2.5rem 1rem;
    -webkit-font-smoothing: antialiased;
}

/* ── Premium Page Card ── */
.page {
    max-width: 800px;
    margin: 0 auto;
    background:
        linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, transparent 50%),
        var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 8px 32px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(99, 102, 241, 0.08);
    padding: 3rem 3.5rem;
    margin-bottom: 2rem;
    position: relative;
}

/* Subtle top glow edge */
.page::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 2rem;
    right: 2rem;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(99, 102, 241, 0.3),
        rgba(99, 102, 241, 0.6),
        rgba(99, 102, 241, 0.3),
        transparent
    );
}

/* ── Branded Header ── */
.document-header {
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}
.document-header::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    box-shadow: 0 0 8px var(--accent-glow);
}
.document-header .brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.document-header .brand .accent { color: var(--accent); }
.document-header .brand .tagline {
    display: block;
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.7;
    margin-top: 0.05rem;
    line-height: 1.2;
}
.document-header .doc-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: right;
    padding: 0.35rem 0.85rem;
    background: linear-gradient(135deg, var(--accent-light), var(--accent-mid));
    border-radius: var(--radius);
    border: 1px solid rgba(99, 102, 241, 0.2);
    backdrop-filter: blur(4px);
    white-space: nowrap;
}

/* ── Premium Accent Bar ── */
.accent-bar {
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg,
        var(--accent) 0%,
        #818CF8 40%,
        var(--accent) 70%,
        rgba(99, 102, 241, 0.3) 100%
    );
    margin-bottom: 2rem;
    border-radius: 2px;
    box-shadow: 0 0 12px var(--accent-glow);
    position: relative;
    overflow: hidden;
}
.accent-bar::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    animation: shimmer 3s ease-in-out infinite;
}
@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* ── Typography ── */
h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--text);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    line-height: 1.25;
}
h2 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--text);
    margin: 2rem 0 0.75rem 0;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border);
    letter-spacing: -0.01em;
}
h2:first-of-type { margin-top: 0; }
h2 .accent-highlight {
    color: var(--accent);
}
h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--accent);
    margin: 1.25rem 0 0.4rem 0;
    letter-spacing: -0.01em;
}

p { margin-bottom: 0.75rem; font-size: 0.95rem; color: var(--text-secondary); }
p:last-child { margin-bottom: 0; }
p.lead {
    font-size: 1.05rem;
    color: var(--neutral);
    line-height: 1.7;
}
strong { color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ── Premium Key Terms Box ── */
.key-terms {
    background: linear-gradient(135deg, var(--accent-mid), var(--accent-light));
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin: 1.25rem 0;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        inset 2px 0 0 var(--accent);
    position: relative;
}
.key-terms::before {
    content: "◆";
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 1.2rem;
    color: var(--accent);
    opacity: 0.15;
}
.key-terms h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
}
.key-terms p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* ── Premium Wins Box ── */
.wins-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), var(--success-bg));
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin: 1rem 0;
    box-shadow: inset 2px 0 0 var(--success);
    position: relative;
}
.wins-box::before {
    content: "★";
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 1.2rem;
    color: var(--success);
    opacity: 0.15;
}
.wins-box h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--success);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
}
.wins-box p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0; }

/* ── Info Fields ── */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.5rem;
    margin: 1rem 0 1.5rem 0;
}
.info-grid .info-field.full {
    grid-column: 1 / -1;
}
.info-field label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--neutral);
    margin-bottom: 0.2rem;
    display: block;
}

input, textarea {
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: var(--text);
    border: none;
    border-bottom: 1.5px solid var(--border);
    background: transparent;
    width: 100%;
    padding: 0.35rem 0;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus {
    border-bottom-color: var(--accent);
    box-shadow: 0 2px 0 -1px var(--accent);
}
textarea {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem 0.75rem;
    resize: vertical;
    min-height: 60px;
    font-size: 0.9rem;
    background: rgba(15, 15, 19, 0.4);
    backdrop-filter: blur(4px);
    transition: border-color 0.25s ease, background 0.25s ease;
}
textarea:focus {
    border-color: var(--accent);
    background: rgba(15, 15, 19, 0.6);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.1);
}

/* ── Premium Tables ── */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1rem 0;
    font-size: 0.88rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
th {
    background: linear-gradient(135deg, var(--accent), #4F46E5);
    color: white;
    font-weight: 600;
    text-align: left;
    padding: 0.7rem 0.9rem;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: none;
    position: relative;
}
th:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
}
td {
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: rgba(31, 33, 40, 0.6); }
tr:hover td { background: rgba(99, 102, 241, 0.02); }
td input {
    font-size: 0.88rem;
    color: var(--text);
    border-bottom-width: 1px;
}
td input:focus {
    border-bottom-color: var(--accent);
    box-shadow: 0 1px 0 -1px var(--accent);
}
td.highlight-cell { color: var(--accent); font-weight: 600; }

/* ── Lists ── */
ul, ol { margin: 0.5rem 0 1rem 1.25rem; font-size: 0.92rem; }
li { margin-bottom: 0.3rem; color: var(--text-secondary); }
li:last-child { margin-bottom: 0; }
li strong { color: var(--accent); }

/* ordered list styling */
ol { counter-reset: item; }
ol li { padding-left: 0.25rem; }
ol li::marker { color: var(--accent); font-weight: 600; }

/* ── Premium Checklist ── */
.checklist { list-style: none; margin-left: 0; }
.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.25rem 0;
}
.checklist li::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--muted);
    border-radius: 4px;
    margin-top: 0.2rem;
    flex-shrink: 0;
    transition: border-color 0.2s, background 0.2s;
}
.checklist li:hover::before {
    border-color: var(--accent);
}
input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    margin-top: 0.2rem;
    flex-shrink: 0;
}

/* ── Premium Signature Block ── */
.signature-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}
.signature-box {
    border-radius: var(--radius);
    padding: 1.5rem 1.5rem 1.25rem;
    background: linear-gradient(160deg, rgba(15, 15, 19, 0.6), var(--bg-light));
    border: 1px solid var(--border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    position: relative;
}
.signature-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    border-radius: var(--radius) var(--radius) 0 0;
}
.signature-box h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin: 0 0 0.75rem 0;
    border: none;
    padding: 0;
}
.signature-box .name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 1rem;
}
.signature-box .sig-line {
    border-bottom: 1.5px solid var(--border);
    margin: 0.75rem 0 0.2rem;
    min-height: 1.8rem;
}
.signature-box .sig-line input {
    font-size: 0.95rem;
}
.signature-box label {
    font-size: 0.65rem;
    color: var(--neutral);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 0.25rem;
}

/* ── Premium Tags ── */
.tag {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
}
.tag-accent {
    background: linear-gradient(135deg, var(--accent-light), rgba(99, 102, 241, 0.18));
    color: var(--accent);
    border-color: rgba(99, 102, 241, 0.2);
}
.tag-success {
    background: linear-gradient(135deg, var(--success-bg), rgba(16, 185, 129, 0.12));
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.2);
}
.tag-warning {
    background: linear-gradient(135deg, var(--warning-bg), rgba(245, 158, 11, 0.12));
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.2);
}

/* ── Divider ── */
hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.75rem 0;
    position: relative;
}

/* ── Footer ── */
.document-footer {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 0.02em;
}
.document-footer span:last-child {
    color: var(--accent);
    opacity: 0.6;
}

/* ── Buttons ── */
.btn {
    display: inline-block;
    padding: 0.55rem 1.3rem;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    text-decoration: none;
    color: white;
}

/* ── Brand Logo ── */
.brand-logo {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.2rem;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* ── Print — overrides to white bg for printing ── */
@media print {
    .brand-logo { filter: none; opacity: 1; }
    body {
        background: white !important;
        padding: 0;
        background-image: none !important;
    }
    .page {
        background: white !important;
        box-shadow: none !important;
        padding: 2rem;
        border-radius: 0;
        margin: 0;
        break-inside: avoid;
        border: none;
    }
    .page::before { display: none; }
    .accent-bar { background: linear-gradient(90deg, #6366F1, #818CF8) !important; box-shadow: none; height: 3px; }
    .accent-bar::after { display: none; animation: none; }
    .document-header::after { background: #6366F1; box-shadow: none; }
    h1, h2, h3, .document-header .brand { color: #1A1C20 !important; }
    p, li, td { color: #333 !important; }
    p.lead { color: #555 !important; }
    .text-secondary { color: #555 !important; }
    th {
        background: #1A1C20 !important;
        color: white !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    th::after { display: none; }
    tr:nth-child(even) td { background: #F7F8FA !important; }
    tr:hover td { background: inherit; }
    .key-terms {
        background: #EEF2FF !important;
        border-left-color: #6366F1 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .key-terms::before { display: none; }
    .wins-box {
        background: #ECFDF5 !important;
        border-left-color: #10B981 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .wins-box::before { display: none; }
    .doc-title {
        background: #EEF2FF !important;
        color: #6366F1 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .signature-box {
        background: #F7F8FA !important;
        border-color: #E5E7EB !important;
    }
    .signature-box::before { background: #6366F1 !important; }
    .document-footer { color: #9CA3AF !important; }
    .document-footer span:last-child { color: #6366F1 !important; }
    input, textarea { color: #1A1C20 !important; background: transparent !important; }
    input::placeholder, textarea::placeholder { color: #9CA3AF !important; }
    .btn { display: none; }
    .checklist li::before { border-color: #9CA3AF; }
    .checklist li:hover::before { border-color: #9CA3AF; }
    table { box-shadow: none !important; }
    .tag-accent { background: #EEF2FF !important; border-color: #C7D2FE !important; }
    .tag-success { background: #ECFDF5 !important; border-color: #A7F3D0 !important; }
    .tag-warning { background: #FFFBEB !important; border-color: #FDE68A !important; }
    li::marker { color: #6366F1 !important; }
}

/* ── Responsive ── */
@media (max-width: 900px) {
    body { padding: 1.5rem 0.75rem; }
    .page { padding: 2rem 1.5rem; }
    .document-header { flex-direction: column; gap: 0.75rem; align-items: stretch; }
    .document-header .doc-title { text-align: left; align-self: flex-start; }
    .signature-block { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .page { padding: 1.5rem 1rem; border-radius: var(--radius); }
    .info-grid { grid-template-columns: 1fr; }
    .document-header .brand { font-size: 1.15rem; }
    h1 { font-size: 1.3rem; }
    h2 { font-size: 1rem; }
}
