* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #0d0d0d; color: #e0e0e0; }
a { color: #ffd700; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Login */
.login-page { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(135deg, #0d0d0d, #1a1a2e); }
.login-card { background: #16213e; padding: 40px; border-radius: 12px; width: 380px; text-align: center; box-shadow: 0 8px 32px rgba(0,0,0,.5); }
.login-card .logo { color: #ffd700; font-size: 32px; letter-spacing: 3px; margin-bottom: 4px; }
.login-card .subtitle { color: #888; margin-bottom: 24px; }
.login-card input { width: 100%; padding: 12px 16px; margin-bottom: 12px; background: #0d0d0d; border: 1px solid #333; border-radius: 8px; color: #fff; font-size: 14px; }
.login-card input:focus { outline: none; border-color: #ffd700; }
.login-card button { width: 100%; padding: 14px; background: #ffd700; color: #000; border: none; border-radius: 8px; font-size: 16px; font-weight: bold; cursor: pointer; }
.login-card button:hover { background: #ffed4a; }
.alert-error { background: #ff525233; color: #ff5252; padding: 10px; border-radius: 6px; margin-bottom: 12px; }

/* Top Nav */
.topnav { display: flex; align-items: center; background: #1a1a2e; padding: 0 20px; height: 50px; border-bottom: 2px solid #ffd70033; }
.topnav .logo { color: #ffd700; font-size: 18px; font-weight: bold; letter-spacing: 2px; margin-right: 24px; }
.nav-item { color: #888; padding: 14px 16px; cursor: pointer; font-size: 13px; border-bottom: 2px solid transparent; transition: .2s; }
.nav-item:hover { color: #ffd700; }
.nav-item.active { color: #ffd700; border-bottom-color: #ffd700; }
.nav-right { margin-left: auto; color: #888; font-size: 13px; }

/* Tabs */
.tab-content { display: none; padding: 20px; }
.tab-content.active { display: block; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #16213e; padding: 20px; border-radius: 10px; text-align: center; border: 1px solid #ffffff10; }
.stat-card .stat-value { font-size: 36px; font-weight: bold; color: #ffd700; }
.stat-card .stat-label { color: #888; font-size: 13px; margin-top: 4px; }
.stat-card.green .stat-value { color: #00e676; }
.stat-card.red .stat-value { color: #ff5252; }
.stat-card.blue .stat-value { color: #4da8da; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: #16213e; color: #ffd700; padding: 12px; text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; position: sticky; top: 0; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid #ffffff10; font-size: 13px; }
.data-table tr:hover { background: #ffffff05; }

/* Toolbar */
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.toolbar h2 { font-size: 18px; color: #ffd700; }

/* Buttons */
.btn { padding: 8px 16px; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; color: #fff; background: #333; }
.btn:hover { background: #444; }
.btn-gold { background: #ffd700; color: #000; font-weight: bold; }
.btn-gold:hover { background: #ffed4a; }
.btn-sm { padding: 4px 10px; font-size: 11px; border-radius: 4px; }
.btn-danger { background: #ff5252; }
.btn-danger:hover { background: #ff1744; }
.btn-success { background: #00e676; color: #000; }

/* Badges */
.badge { display: inline-block; padding: 3px 8px; border-radius: 10px; font-size: 11px; font-weight: bold; }
.badge-online { background: #00e67633; color: #00e676; }
.badge-offline { background: #ff525233; color: #ff5252; }
.badge-active { background: #4da8da33; color: #4da8da; }
.badge-expired { background: #ff525233; color: #ff5252; }
.badge-warning { background: #ffab4033; color: #ffab40; }

/* Modal */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,.7); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal-content { background: #16213e; padding: 30px; border-radius: 12px; width: 500px; max-width: 90%; max-height: 80vh; overflow-y: auto; position: relative; }
.modal-close { position: absolute; top: 10px; right: 16px; font-size: 24px; cursor: pointer; color: #888; }
.modal-content h3 { color: #ffd700; margin-bottom: 16px; }
.modal-content label { display: block; color: #888; font-size: 12px; margin-bottom: 4px; margin-top: 12px; }
.modal-content input, .modal-content select { width: 100%; padding: 10px; background: #0d0d0d; border: 1px solid #333; border-radius: 6px; color: #fff; font-size: 14px; }
.modal-content input:focus, .modal-content select:focus { border-color: #ffd700; outline: none; }
.modal-content button { margin-top: 20px; }

/* Device Key */
.device-key { font-family: monospace; background: #0d0d0d; padding: 4px 8px; border-radius: 4px; color: #ffd700; font-size: 12px; letter-spacing: 1px; cursor: pointer; }

/* Checkbox list */
.checkbox-list label { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; color: #e0e0e0; }
.checkbox-list input[type="checkbox"] { accent-color: #ffd700; }
