/* ShopiFlipFlop Admin — dark mode stylesheet (Catppuccin Mocha) */
/* Palette: base #1e1e2e | mantle #181825 | crust #11111b | surface0 #313244 | surface1 #45475a | surface2 #585b70 | text #cdd6f4 | subtext1 #bac2de | subtext0 #a6adc8 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, sans-serif; display: flex; background: #1e1e2e; color: #cdd6f4; }
.sidebar { width: 220px; min-height: 100vh; background: #181825; color: #cdd6f4; padding: 1.5rem 1rem; display: flex; flex-direction: column; }
.sidebar-brand { font-size: 1.1rem; font-weight: 700; margin-bottom: 2rem; color: #cdd6f4; }
.sidebar ul { list-style: none; flex: 1; }
.sidebar ul li a { display: block; padding: .6rem .8rem; border-radius: 6px; color: #bac2de; text-decoration: none; margin-bottom: .25rem; }
.sidebar ul li a:hover, .sidebar ul li a.active { background: #313244; color: #cdd6f4; }
.sidebar-footer { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.sidebar-user { color: #585b70; font-size: .85rem; flex: 1; }
.sidebar-footer a { color: #585b70; font-size: .85rem; text-decoration: none; }
.logout-form { display: inline; }
.main-content { flex: 1; padding: 2rem; }
h2 { margin-bottom: 1.5rem; color: #cdd6f4; }
h3 { color: #cdd6f4; }
.alert { padding: .75rem 1rem; border-radius: 6px; margin-bottom: 1rem; }
.alert-error { background: #f38ba8; color: #1e1e2e; }
.alert-success { background: #a6e3a1; color: #1e1e2e; }
.btn { padding: .5rem 1rem; border-radius: 6px; border: none; cursor: pointer; font-size: .9rem; text-decoration: none; display: inline-block; }
.btn-primary { background: #89b4fa; color: #1e1e2e; }
.btn-danger { background: #f38ba8; color: #1e1e2e; }
.btn-success { background: #a6e3a1; color: #1e1e2e; }
.btn-link { background: none; border: none; cursor: pointer; color: #89b4fa; text-decoration: underline; font-size: inherit; }
.data-table { width: 100%; border-collapse: collapse; background: #181825; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.data-table th, .data-table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid #313244; color: #cdd6f4; }
.data-table th { background: #11111b; font-weight: 600; color: #a6adc8; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #313244; }
.badge { padding: .25rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.badge-active { background: #a6e3a1; color: #1e1e2e; }
.badge-trial { background: #f9e2af; color: #1e1e2e; }
.badge-expired, .badge-cancelled, .badge-suspended { background: #f38ba8; color: #1e1e2e; }
.badge-admin { background: #cba6f7; color: #1e1e2e; }
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.metric-card { background: #181825; border-radius: 8px; padding: 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,.4); display: flex; flex-direction: column; gap: .25rem; border: 1px solid #313244; }
.chart-card { background: #181825; border-radius: 8px; padding: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,.4); margin-bottom: 2rem; border: 1px solid #313244; }
.chart-card h3 { margin-bottom: 1rem; font-size: .95rem; color: #a6adc8; font-weight: 600; }
.chart-wrapper { position: relative; height: 260px; }
.metric-label { font-size: .8rem; color: #a6adc8; }
.metric-value { font-size: 1.8rem; font-weight: 700; color: #cdd6f4; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.filters { display: flex; gap: 1rem; margin-bottom: 1rem; }
.filters select { padding: .4rem .75rem; border-radius: 6px; border: 1px solid #45475a; background: #181825; color: #cdd6f4; }
.filters select option { background: #181825; color: #cdd6f4; }
.progress-bar { width: 80px; height: 6px; background: #313244; border-radius: 3px; display: inline-block; vertical-align: middle; margin-right: .4rem; }
.progress-fill { height: 100%; background: #89b4fa; border-radius: 3px; }
.progress-warning { background: #f38ba8; }
.fulfillment-text { font-size: .85rem; color: #a6adc8; }
.actions-cell { white-space: nowrap; }
.actions-cell a, .actions-cell button { margin-right: .4rem; }
.action-form { display: inline; }
.empty-row { color: #585b70; text-align: center; padding: 1.5rem !important; }
.back-link { display: inline-block; margin-bottom: 1rem; color: #89b4fa; text-decoration: none; font-size: .9rem; }
.back-link:hover { text-decoration: underline; }
.actions { margin: 1.5rem 0; display: flex; gap: .75rem; }
.plan-cell { text-transform: capitalize; font-size: .85rem; color: #bac2de; }
.filters .btn-link { font-size: .85rem; padding: .4rem .5rem; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0; }
.detail-card { background: #181825; border-radius: 8px; padding: 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,.4); border: 1px solid #313244; }
.detail-card.full-width { grid-column: 1 / -1; }
.detail-card h3 { margin-bottom: .75rem; color: #cdd6f4; }
dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem .75rem; }
dt { font-weight: 600; color: #a6adc8; }
dd { color: #cdd6f4; }
.form-group { margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: .4rem; max-width: 480px; }
.form-group label { font-weight: 600; color: #cdd6f4; }
.form-group input, .form-group select, .form-group textarea { padding: .5rem .75rem; border: 1px solid #45475a; border-radius: 6px; font-size: .95rem; background: #11111b; color: #cdd6f4; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #89b4fa; }
.form-group select option { background: #11111b; color: #cdd6f4; }
.license-key-display { font-size: 1.2rem; display: block; margin-top: .5rem; background: #11111b; color: #a6e3a1; padding: .5rem .75rem; border-radius: 6px; letter-spacing: .05em; }
.key-reveal { border-left: 4px solid #a6e3a1; }
.form-card { background: #181825; border-radius: 8px; padding: 1.75rem; box-shadow: 0 1px 3px rgba(0,0,0,.4); max-width: 540px; margin-top: 1.5rem; border: 1px solid #313244; }
.hidden { display: none !important; }
section { margin-bottom: 2.5rem; }
section h3 { margin-bottom: 1rem; }
.alert-section { background: #181825; border-radius: 8px; padding: 1.25rem 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,.4); margin-bottom: 1.5rem; border: 1px solid #313244; }
.alert-section h3 { display: flex; align-items: center; gap: .5rem; font-size: 1rem; margin-bottom: 1rem; color: #cdd6f4; }
.alert-section-urgent  { border-left: 4px solid #f38ba8; }
.alert-section-warning { border-left: 4px solid #f9e2af; }
.alert-section-info    { border-left: 4px solid #89b4fa; }
.alert-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot-red    { background: #f38ba8; }
.dot-yellow { background: #f9e2af; }
.dot-blue   { background: #89b4fa; }
.dot-green  { background: #a6e3a1; }
.alert-count { margin-left: auto; background: #313244; border-radius: 999px; padding: .1rem .6rem; font-size: .8rem; font-weight: 700; color: #bac2de; }
.alert-empty { color: #585b70; font-size: .9rem; margin: 0; }
.alert-badge { padding: .3rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.alert-badge-ok   { background: #a6e3a1; color: #1e1e2e; }
.alert-badge-warn { background: #f38ba8; color: #1e1e2e; }
.days-badge { display: inline-block; padding: .15rem .5rem; border-radius: 4px; font-size: .8rem; font-weight: 600; background: #f9e2af; color: #1e1e2e; }
.days-critical { background: #f38ba8; }
.usage-pct { font-weight: 700; color: #cdd6f4; }
.usage-critical { color: #f38ba8; }
.usage-full     { color: #f38ba8; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.modal-card { background: #181825; border: 1px solid #45475a; border-radius: 10px; padding: 1.75rem; width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 1rem; box-shadow: 0 8px 32px rgba(0,0,0,.5); }
.modal-card h3 { color: #f38ba8; }
.modal-desc { color: #a6adc8; font-size: .9rem; }
.modal-actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: .5rem; }
body.login-page { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: #1e1e2e; }
.login-card { background: #181825; border-radius: 10px; padding: 2rem; width: 100%; max-width: 380px; box-shadow: 0 2px 12px rgba(0,0,0,.5); display: flex; flex-direction: column; gap: .75rem; border: 1px solid #313244; }
.login-card h1 { font-size: 1.4rem; color: #cdd6f4; }
.login-card p { color: #89b4fa; }
.login-card label { font-weight: 600; font-size: .9rem; color: #a6adc8; }
.login-card input { padding: .5rem .75rem; border: 1px solid #45475a; border-radius: 6px; font-size: .95rem; width: 100%; background: #11111b; color: #cdd6f4; }
.login-card input:focus { outline: none; border-color: #89b4fa; }
.login-card button { padding: .6rem; background: #89b4fa; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; color: #1e1e2e; }
.login-card button:hover { background: #74c7ec; }
