* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Tahoma, sans-serif; background: #f4f7f6; color: #333; line-height: 1.6; }

.topbar { background: linear-gradient(135deg, #2c3e50, #34495e); color: white; padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,0.1); flex-wrap: wrap; gap: 15px; }
.logo { font-size: 1.3rem; font-weight: bold; display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 1.6rem; }
.main-nav { display: flex; gap: 5px; flex-wrap: wrap; }
.main-nav a { color: white; text-decoration: none; padding: 8px 15px; border-radius: 6px; transition: all 0.2s; font-size: 0.95rem; }
.main-nav a:hover { background: rgba(255,255,255,0.1); }
.main-nav a.active { background: #00ce8d; }
.user-info { display: flex; align-items: center; gap: 15px; font-size: 0.9rem; }
.btn-logout { background: #e74c3c; color: white; padding: 6px 15px; border-radius: 6px; text-decoration: none; font-size: 0.85rem; }
.btn-logout:hover { background: #c0392b; }

.container { max-width: 1200px; margin: 30px auto; padding: 0 20px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 30px; }
.stat-card { background: white; padding: 20px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); text-align: center; transition: transform 0.2s; }
.stat-card:hover { transform: translateY(-3px); }
.stat-card .icon { font-size: 2rem; margin-bottom: 10px; }
.stat-card .num { font-size: 2rem; font-weight: bold; color: #00ce8d; }
.stat-card .lbl { color: #7f8c8d; font-size: 0.9rem; margin-top: 5px; }

.card { background: white; padding: 25px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); margin-bottom: 25px; }
.card h2 { color: #2c3e50; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid #ecf0f1; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: right; border-bottom: 1px solid #eee; }
th { background: #f8f9fa; color: #555; font-weight: 600; font-size: 0.9rem; }
tr:hover { background: #f8f9fa; }

.btn { display: inline-block; padding: 8px 16px; border-radius: 6px; text-decoration: none; font-size: 0.9rem; cursor: pointer; border: none; font-family: inherit; transition: all 0.2s; }
.btn-primary { background: #3498db; color: white; }
.btn-primary:hover { background: #2980b9; }
.btn-success { background: #27ae60; color: white; }
.btn-success:hover { background: #229954; }
.btn-danger { background: #e74c3c; color: white; }
.btn-danger:hover { background: #c0392b; }
.btn-warning { background: #f39c12; color: white; }
.btn-sm { padding: 5px 12px; font-size: 0.85rem; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: #2c3e50; font-weight: 600; font-size: 0.95rem; }
.form-group input, .form-group select { width: 100%; padding: 12px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 1rem; font-family: inherit; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: #00ce8d; }
.form-group small { display: block; color: #7f8c8d; margin-top: 5px; font-size: 0.85rem; }

.alert { padding: 15px 20px; border-radius: 8px; margin-bottom: 20px; }
.alert-success { background: #d4edda; color: #155724; border-right: 4px solid #27ae60; }
.alert-error { background: #f8d7da; color: #721c24; border-right: 4px solid #e74c3c; }

.badge { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 0.8rem; font-weight: 600; }
.badge-daily { background: #3498db; color: white; }
.badge-monthly { background: #9b59b6; color: white; }
.badge-active { background: #27ae60; color: white; }
.badge-suspended { background: #e74c3c; color: white; }

.login-page { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(135deg, #2c3e50, #3498db); padding: 20px; }
.login-box { background: white; padding: 40px; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); width: 100%; max-width: 400px; }
.login-box h1 { text-align: center; color: #2c3e50; margin-bottom: 10px; font-size: 1.5rem; }
.login-box .sub { text-align: center; color: #7f8c8d; margin-bottom: 30px; font-size: 0.9rem; }
.login-box .icon { text-align: center; font-size: 3rem; margin-bottom: 15px; }

.footer { text-align: center; padding: 20px; color: #95a5a6; font-size: 0.85rem; }

.actions { display: flex; gap: 8px; }
.empty { text-align: center; padding: 40px; color: #95a5a6; }
.empty .icon { font-size: 3rem; margin-bottom: 15px; }


th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    white-space: nowrap;
    transition: background 0.2s;
}
th.sortable:hover {
    background: rgba(0,0,0,0.05);
}
th.sortable .sort-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: 6px;
    vertical-align: middle;
    opacity: 0.35;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    transition: transform 0.2s, opacity 0.2s;
}
th.sortable.sort-asc .sort-arrow {
    opacity: 1;
    transform: rotate(180deg);
}
th.sortable.sort-desc .sort-arrow {
    opacity: 1;
    transform: rotate(0deg);
}
th.sortable.sort-asc,
th.sortable.sort-desc {
    color: #2980b9;
}
