/* ============================================================
   Stripes Ahead · Officer Web App
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@400;500;600;700;800&family=Public+Sans:wght@400;500;600;700&display=swap');

:root {
    --primary: #102552;
    --primary-light: #1C376F;
    --primary-dark: #0A1837;
    --text-primary: #102552;
    --text-secondary: #5F6B7A;
    --text-muted: #9AA5B5;
    --border: #D9DFEA;
    --border-light: #E6EAF1;
    --bg-page: #F8F9FC;
    --bg-subtle: #EEF1F7;
    --white: #fff;
    --amber-bg: #FFF7ED;
    --amber-border: #F1D9B5;
    --amber-text: #8A5A1B;
    --amber-heading: #8A5A1B;
    --success: #2E9E6B;
    --danger: #D64545;
    --font-heading: 'Libre Franklin', sans-serif;
    --font-body: 'Public Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-body); color: var(--text-primary); -webkit-font-smoothing: antialiased; }
a { color: var(--primary-light); text-decoration: none; }
a:hover { color: var(--primary); }

/* ---------- Split-Screen Auth Layout ---------- */
.auth-split {
    display: flex;
    min-height: 100vh;
}

.auth-brand {
    width: 52%;
    background: linear-gradient(150deg, #1C376F 0%, #102552 55%, #0A1837 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-brand-decoration {
    position: absolute;
    inset: 0;
    opacity: 0.07;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 34px;
    pointer-events: none;
}

.auth-brand-logo {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-brand-logo-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 20px;
    line-height: 1;
}

.auth-brand-logo-sub {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    margin-top: 4px;
}

.auth-brand-content {
    position: relative;
}

.auth-brand-content h2 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 38px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 18px;
    max-width: 460px;
}

.auth-brand-content p {
    font-size: 17px;
    line-height: 1.65;
    color: rgba(255,255,255,0.8);
    max-width: 440px;
    margin: 0;
}

.auth-brand-footer {
    position: relative;
    font-size: 13px;
    color: rgba(255,255,255,0.55);
}

.auth-form {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: #fff;
}

.auth-form-inner {
    width: 100%;
    max-width: 400px;
}

.auth-form-inner h1 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 28px;
    letter-spacing: -0.01em;
    margin: 0 0 6px;
}

.auth-form-inner .auth-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0 0 32px;
}

/* ---------- Form Elements ---------- */
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: #fff;
}

.form-input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(28,55,111,0.12);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 18px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 5px;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.form-checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    flex: none;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    text-decoration: none;
}

.btn-primary {
    height: 52px;
    padding: 0 28px;
    background: var(--primary);
    color: #fff;
    font-size: 16px;
}

.btn-primary:hover {
    background: var(--primary-light);
}

.btn-full {
    width: 100%;
}

.btn-secondary {
    height: 46px;
    padding: 0 22px;
    background: var(--bg-subtle);
    color: var(--text-primary);
    font-size: 14px;
    border: 1.5px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-sm {
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
}

/* ---------- Device Warning ---------- */
.device-warning {
    background: var(--amber-bg);
    border: 1.5px solid var(--amber-border);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
}

.device-warning svg {
    flex: none;
    margin-top: 1px;
}

.device-warning-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--amber-heading);
    margin-bottom: 3px;
}

.device-warning-text {
    font-size: 13px;
    color: var(--amber-text);
    line-height: 1.5;
}

/* ---------- Alert Messages ---------- */
.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: #FEF2F2;
    border: 1.5px solid #FECACA;
    color: #991B1B;
}

.alert-success {
    background: #F0FDF4;
    border: 1.5px solid #BBF7D0;
    color: #166534;
}

.alert-warning {
    background: var(--amber-bg);
    border: 1.5px solid var(--amber-border);
    color: var(--amber-text);
}

/* ---------- Auth Footer ---------- */
.auth-footer {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 24px;
}

.auth-footer a {
    font-weight: 600;
    color: var(--primary-light);
}

/* ---------- Forgot Password Link ---------- */
.forgot-link {
    display: block;
    text-align: right;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 20px;
    margin-top: -10px;
}

/* ---------- Purchase Page ---------- */
.purchase-wrapper {
    min-height: 100vh;
    background: var(--bg-page);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.purchase-card {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 12px 40px rgba(16,37,82,0.1);
    border: 1px solid var(--border);
}

.purchase-card h1 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 26px;
    margin: 0 0 6px;
}

.purchase-card .purchase-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0 0 28px;
}

.purchase-product {
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 24px;
}

.purchase-product-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 17px;
    margin-bottom: 4px;
}

.purchase-product-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.purchase-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.purchase-price-current {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 32px;
}

.purchase-price-original {
    font-size: 18px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.purchase-price-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.promo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 8px;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #166534;
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
}

/* Coupon tickets */
.coupon-ticket {
    display: flex;
    align-items: stretch;
    width: 100%;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #102552 0%, #1a3a6e 100%);
    color: #fff;
    cursor: pointer;
    margin-bottom: 10px;
    overflow: hidden;
    font-family: var(--font-body);
    transition: transform 0.15s, box-shadow 0.15s;
    padding: 0;
    text-align: left;
}
.coupon-ticket:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16, 37, 82, 0.25);
}
.coupon-ticket-left {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    flex: 0 0 auto;
    min-width: 90px;
}
.coupon-ticket-pct {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 18px;
    white-space: nowrap;
    letter-spacing: -0.01em;
}
.coupon-ticket-divider {
    width: 1px;
    align-self: stretch;
    margin: 10px 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.3) 0px,
        rgba(255,255,255,0.3) 4px,
        transparent 4px,
        transparent 8px
    );
}
.coupon-ticket-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px 20px;
    flex: 1;
    min-width: 0;
}
.coupon-ticket-code {
    font-family: monospace;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
}
.coupon-ticket-save {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    line-height: 1.4;
}

/* Trial banners */
.trial-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
}
.trial-banner strong {
    font-size: 14px;
}
.trial-banner--active {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #065F46;
}
.trial-banner--expired {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
}
.trial-topbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #FFF7ED 0%, #FFFBEB 100%);
    border-bottom: 1px solid #FDE68A;
    font-size: 13px;
    font-weight: 600;
    color: #92400E;
}
.trial-topbar a {
    color: #92400E;
    text-decoration: underline;
    font-weight: 700;
}

.purchase-secure {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.purchase-logout {
    text-align: center;
    margin-top: 20px;
}

.purchase-logout a {
    font-size: 13px;
    color: var(--text-muted);
}

/* ---------- Success / Cancel Pages ---------- */
.result-wrapper {
    min-height: 100vh;
    background: var(--bg-page);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.result-card {
    text-align: center;
    background: #fff;
    border-radius: 20px;
    padding: 48px 40px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 12px 40px rgba(16,37,82,0.1);
    border: 1px solid var(--border);
}

.result-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.result-icon-success {
    background: #F0FDF4;
    color: var(--success);
}

.result-icon-cancel {
    background: var(--bg-subtle);
    color: var(--text-secondary);
}

.result-card h1 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 26px;
    margin: 0 0 10px;
}

.result-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 28px;
}

/* ---------- Officer Layout (stub) ---------- */
.officer-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-page);
}

.officer-sidebar {
    width: 264px;
    background: #fff;
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    flex: none;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
}

.officer-sidebar-logo {
    padding: 24px 22px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--bg-subtle);
}

.officer-sidebar-logo-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 16px;
    line-height: 1;
}

.officer-sidebar-logo-sub {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 3px;
}

.officer-nav {
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.officer-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
}

.officer-nav-link:hover {
    background: var(--bg-page);
    color: var(--text-primary);
}

.officer-nav-link.active {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

.officer-nav-link.active svg path,
.officer-nav-link.active svg rect,
.officer-nav-link.active svg circle {
    stroke: #fff;
    fill: none;
}

.officer-nav-link.active svg .fill-icon {
    fill: #fff;
    stroke: none;
}

.officer-progress-widget {
    margin: 8px 14px 0;
    padding: 16px;
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    border-radius: 12px;
}

.officer-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.officer-progress-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.officer-progress-value {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 16px;
}

.officer-progress-bar {
    height: 8px;
    border-radius: 999px;
    background: var(--border-light);
    overflow: hidden;
    margin-bottom: 10px;
}

.officer-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1C376F, #102552);
    border-radius: 999px;
    transition: width 0.3s;
}

.officer-progress-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.officer-sidebar-user {
    margin-top: auto;
    padding: 16px 18px;
    border-top: 1px solid var(--bg-subtle);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.officer-sidebar-user:hover {
    background: var(--bg-page);
}

.officer-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-subtle);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex: none;
}

.officer-user-name {
    font-weight: 700;
    font-size: 14px;
}

.officer-user-access {
    font-size: 12px;
    color: var(--text-secondary);
}

.officer-main {
    flex: 1;
    margin-left: 264px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.officer-topbar {
    height: 72px;
    border-bottom: 1px solid var(--border-light);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    flex: none;
}

.officer-search {
    height: 42px;
    width: 360px;
    border-radius: 11px;
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    color: var(--text-muted);
    font-size: 14px;
}

.officer-search input {
    border: none;
    background: transparent;
    outline: none;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-primary);
    flex: 1;
}

.officer-search input::placeholder {
    color: var(--text-muted);
}

.officer-content {
    flex: 1;
    padding: 36px 40px;
    overflow-y: auto;
}

/* ---------- Copyright ---------- */
.copyright {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .auth-split {
        flex-direction: column;
    }
    .auth-brand {
        width: 100%;
        padding: 32px;
        min-height: auto;
    }
    .auth-brand-content h2 {
        font-size: 26px;
    }
    .auth-brand-content p {
        display: none;
    }
    .auth-form {
        padding: 32px 24px;
    }
    .purchase-card {
        padding: 28px 24px;
    }
    .officer-sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s;
    }
    .officer-sidebar.open {
        transform: translateX(0);
    }
    .officer-main {
        margin-left: 0;
    }
    .officer-topbar {
        padding: 0 20px;
    }
    .officer-search {
        width: 100%;
        max-width: 280px;
    }
    .officer-content {
        padding: 24px 20px;
    }
}
