/* ══════════════════════════════════════════
   Olive 360 License Manager — Admin CSS
   Palette: Olive #556B2F | Mustard #C8A951
   ══════════════════════════════════════════ */

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

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 13px;
    background: #F5F5F0;
    color: #1A1A14;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.topbar {
    background: #2E3A1F;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 52px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.topbar-brand { display: flex; flex-direction: column; }
.brand-name { color: #F0EDD0; font-size: 15px; font-weight: 700; }
.brand-sub  { color: #C8A951; font-size: 10px; letter-spacing: .5px; }
.topbar-nav { display: flex; gap: 4px; align-items: center; }
.topbar-nav a {
    color: #B8C8A0; text-decoration: none; padding: 6px 14px;
    border-radius: 5px; font-size: 13px; font-weight: 500;
    transition: background .15s, color .15s;
}
.topbar-nav a:hover, .topbar-nav a.active { background: #556B2F; color: #F0EDD0; }
.topbar-nav .nav-logout { color: #E67E22; }
.topbar-nav .nav-logout:hover { background: #E67E22; color: #fff; }

/* Main content */
.main-content { flex: 1; padding: 28px 32px; max-width: 1300px; width: 100%; margin: 0 auto; }

/* Footer */
.footer {
    background: #2E3A1F; color: #7A8A5A; text-align: center;
    padding: 12px; font-size: 11px;
}
.footer a { color: #C8A951; text-decoration: none; }

/* Page header */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-title { font-size: 20px; font-weight: 700; color: #3D4F22; }

/* KPI Grid */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin-bottom: 28px; }
.kpi-card {
    background: #fff; border: 1px solid #D5D0C0; border-radius: 8px;
    padding: 20px 16px; text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.kpi-value { font-size: 32px; font-weight: 700; color: #556B2F; }
.kpi-label { font-size: 11px; color: #5A5A48; margin-top: 4px; text-transform: uppercase; letter-spacing: .5px; }
.kpi-gold  .kpi-value { color: #C8A951; }
.kpi-green .kpi-value { color: #4A7C59; }
.kpi-warn  .kpi-value { color: #E67E22; }

/* Buttons */
.btn {
    display: inline-block; padding: 8px 16px; border-radius: 5px;
    font-size: 13px; font-weight: 600; cursor: pointer; border: none;
    text-decoration: none; transition: background .15s, box-shadow .15s;
}
.btn-primary { background: #556B2F; color: #F0EDD0; }
.btn-primary:hover { background: #3D4F22; }
.btn-outline  { background: transparent; color: #556B2F; border: 1.5px solid #556B2F; }
.btn-outline:hover { background: rgba(85,107,47,0.08); }
.btn-danger  { background: linear-gradient(135deg, #C0392B, #922B21); color: #fff; box-shadow: 0 2px 6px rgba(192,57,43,0.3); }
.btn-danger:hover { background: linear-gradient(135deg, #A93226, #7B241C); transform: translateY(-1px); }
.btn-success { background: linear-gradient(135deg, #4A7C59, #2E6B3E); color: #fff; }
.btn-success:hover { background: linear-gradient(135deg, #3A6147, #1E5B2E); transform: translateY(-1px); }
.btn-warning { background: linear-gradient(135deg, #E67E22, #CA6F1E); color: #fff; }
.btn-warning:hover { background: linear-gradient(135deg, #D35400, #B9470D); transform: translateY(-1px); }
.btn-info    { background: linear-gradient(135deg, #2980B9, #1A6B9A); color: #fff; }
.btn-info:hover { background: linear-gradient(135deg, #1F6FA0, #0F5A87); transform: translateY(-1px); }
.btn-sm  { padding: 5px 12px; font-size: 12px; }
.btn-xs  { padding: 4px 8px; font-size: 11px; border-radius: 4px; }
.btn-block { width: 100%; text-align: center; padding: 11px; }

/* Action buttons row */
.action-btns { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }

/* Forms */
.form-group  { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 5px; color: #3D4F22; }
.form-control,
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 9px 12px; border: 1.5px solid #D5D0C0;
    border-radius: 5px; font-size: 13px; background: #fff;
    transition: border-color .15s;
}
.form-control:focus,
.form-group input:focus, .form-group select:focus {
    outline: none; border-color: #556B2F;
}
.text-muted { color: #7A8A5A; font-size: 11px; }

/* Alerts */
.alert {
    padding: 12px 16px; border-radius: 6px; margin-bottom: 20px;
    font-size: 13px; border-left: 4px solid;
}
.alert-success  { background: #EAF5EE; border-color: #4A7C59; color: #3A6147; }
.alert-warning  { background: #FEF5E9; border-color: #E67E22; color: #A04000; }
.alert-generated, .alert-unblock { background: #EAF5EE; border-color: #4A7C59; color: #3A6147; }
.alert-block, .alert-error       { background: #FDECEB; border-color: #C0392B; color: #A93226; }

/* Table */
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 6px rgba(0,0,0,0.08); }
.data-table thead { position: sticky; top: 52px; z-index: 10; }
.data-table th { background: #2E3A1F; color: #F0EDD0; padding: 12px 14px; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.data-table th input[type=checkbox] { accent-color: #C8A951; width: 15px; height: 15px; cursor: pointer; }
.data-table td { padding: 11px 14px; border-bottom: 1px solid #E8E4D8; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #F5F5F0; }
.data-table .row-blocked td { opacity: 0.65; background: #FEF5E9; }

/* Badges */
.badge { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.badge-monthly  { background: #EBF5FB; color: #2980B9; }
.badge-lifetime { background: #FEF9EC; color: #C8A951; }
.badge-active   { background: #EAF5EE; color: #4A7C59; }
.badge-pending  { background: #F5F5F0; color: #5A5A48; }
.badge-blocked  { background: #FDECEB; color: #C0392B; }
.badge-expired  { background: #FFF3CD; color: #856404; }
.badge-count    { background: #556B2F; color: #fff; padding: 2px 8px; border-radius: 12px; font-size: 12px; margin-left: 8px; }
.badge-info     { background: #EBF5FB; color: #2980B9; }
.badge-warning  { background: #FEF5E9; color: #E67E22; }
.badge-success  { background: #EAF5EE; color: #4A7C59; }
.badge-error    { background: #FDECEB; color: #C0392B; }

/* Mono + small */
.text-mono { font-family: Consolas, monospace; }
.small { font-size: 11px; }
.key-code { font-family: Consolas, monospace; font-size: 12px; background: #F5F5F0; padding: 2px 6px; border-radius: 3px; }

/* KPI Strip */
.kpi-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.kpi-chip  { background: #fff; border: 1px solid #D5D0C0; border-radius: 8px; padding: 10px 18px; display: flex; flex-direction: column; align-items: center; min-width: 90px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.kpi-num   { font-size: 24px; font-weight: 700; color: #556B2F; }
.kpi-chip span:last-child { font-size: 10px; text-transform: uppercase; letter-spacing: .4px; color: #7A8A5A; margin-top: 2px; }
.kpi-chip.active   .kpi-num { color: #4A7C59; }
.kpi-chip.monthly  .kpi-num { color: #2980B9; }
.kpi-chip.lifetime .kpi-num { color: #C8A951; }
.kpi-chip.crashes  .kpi-num { color: #C0392B; }

/* Notification badge on nav */
.nav-badge { background: #C0392B; color: #fff; border-radius: 10px; padding: 1px 6px; font-size: 10px; font-weight: 700; margin-left: 4px; }
.notif-badge { background: #C0392B; color: #fff; border-radius: 10px; padding: 1px 6px; font-size: 11px; font-weight: 700; margin-left: 4px; }

/* Bulk actions bar */
.bulk-actions { display: flex; align-items: center; gap: 10px; background: #FEF9EC; border: 1px solid #C8A951; border-radius: 6px; padding: 8px 14px; font-weight: 600; color: #6B4E11; }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: #7A8A5A; }
.empty-state h3 { margin: 12px 0 6px; font-size: 18px; color: #3D4F22; }

/* Crash stack */
.crash-stack { background: #1A1A14; color: #8FA65A; padding: 16px; border-radius: 6px; font-size: 11px; font-family: Consolas, monospace; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 200; }
.modal-box { background: #fff; border-radius: 10px; padding: 28px; min-width: 380px; max-width: 520px; width: 95vw; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.modal-box h3 { margin-bottom: 20px; color: #3D4F22; font-size: 17px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* Login page */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #2E3A1F; }
.login-card { background: #fff; border-radius: 12px; padding: 40px 36px; width: 380px; box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.login-header { text-align: center; margin-bottom: 28px; }
.login-header h1 { color: #556B2F; font-size: 26px; font-weight: 800; }
.login-header p { color: #C8A951; font-size: 12px; margin-top: 4px; }
.login-footer { text-align: center; margin-top: 20px; font-size: 11px; color: #A0A090; }
.login-footer a { color: #556B2F; text-decoration: none; }

