* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
       background: #f0f2f5; color: #1c1e21; line-height: 1.5; }

/* ===== Login ===== */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.login-box { background: white; padding: 40px; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); width: 380px; }
.login-box h1 { font-size: 28px; margin-bottom: 5px; text-align: center; }
.login-box .subtitle { color: #888; text-align: center; margin-bottom: 25px; }
.login-box input { width: 100%; padding: 12px; margin-bottom: 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 15px; }
.login-box button { width: 100%; padding: 12px; background: #667eea; color: white; border: none; border-radius: 6px; font-size: 15px; cursor: pointer; }
.login-box button:hover { background: #5568d3; }

/* ===== Header ===== */
header { background: #1c1e21; color: white; padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; }
header h1 { font-size: 20px; }
header .user-info { font-size: 14px; }
header a { color: #8ab4f8; text-decoration: none; }

main { max-width: 1400px; margin: 25px auto; padding: 0 25px; }
main h2 { margin: 25px 0 12px; font-size: 18px; }

/* ===== Stats ===== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 25px; }
.stat-card { background: white; padding: 20px; border-radius: 8px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.stat-card .stat-num { font-size: 32px; font-weight: bold; color: #1c1e21; }
.stat-card .stat-lbl { font-size: 13px; color: #65676b; margin-top: 5px; }
.stat-card.green .stat-num { color: #42b72a; }
.stat-card.red .stat-num { color: #e41e3f; }
.stat-card.blue .stat-num { color: #1877f2; }

/* ===== Create form ===== */
.create-form { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 25px; }
.create-form form { display: grid; grid-template-columns: 2fr 2fr 1fr 1fr 2fr auto; gap: 10px; }
.create-form input { padding: 10px; border: 1px solid #ddd; border-radius: 5px; font-size: 13px; }
.create-form button { padding: 10px 20px; background: #42b72a; color: white; border: none; border-radius: 5px; cursor: pointer; font-size: 13px; font-weight: bold; }
.create-form button:hover { background: #36a420; }

/* ===== Table ===== */
table { width: 100%; background: white; border-collapse: collapse; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
th { background: #f5f6f7; font-weight: 600; color: #65676b; text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px; }
.key-cell { font-family: "SF Mono", Monaco, "Courier New", monospace; color: #1877f2; font-weight: bold; }
.row-blocked { background: #fff5f5; }
.row-blocked .key-cell { color: #888; text-decoration: line-through; }

/* ===== Badges ===== */
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: bold; text-transform: uppercase; }
.badge-active { background: #d4edda; color: #155724; }
.badge-blocked { background: #f8d7da; color: #721c24; }
.badge-expired { background: #fff3cd; color: #856404; }

/* ===== Action buttons ===== */
.actions button { padding: 4px 10px; border: none; border-radius: 4px; font-size: 11px; font-weight: bold; cursor: pointer; margin: 0 2px; }
.btn-block { background: #ff9800; color: white; }
.btn-unblock { background: #42b72a; color: white; }
.btn-delete { background: #e41e3f; color: white; }

/* ===== Flash ===== */
.flash { padding: 12px 18px; margin-bottom: 15px; border-radius: 5px; font-size: 14px; }
.flash.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ===== Info table ===== */
.info-table th { width: 200px; }
.info-table code { background: #f5f6f7; padding: 2px 8px; border-radius: 3px; font-family: monospace; }
