* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    background: #0f1115; color: #e6e8eb; line-height: 1.5;
}
a { color: #4aa3ff; text-decoration: none; }
a:hover { text-decoration: underline; }

.nav {
    background: #171a21; border-bottom: 1px solid #262b33;
    padding: 14px 24px; display: flex; align-items: center; gap: 24px;
}
.nav .brand { font-weight: 700; font-size: 18px; color: #fff; }
.nav a { color: #b6bcc6; font-weight: 500; }
.nav a:hover { color: #fff; text-decoration: none; }
.nav .spacer { flex: 1; }
.nav form { margin: 0; }
.nav button.logout {
    background: none; border: 1px solid #3a4250; color: #b6bcc6;
    padding: 6px 14px; border-radius: 6px; cursor: pointer;
}
.nav button.logout:hover { border-color: #ff5d5d; color: #ff5d5d; }

.container { max-width: 1100px; margin: 0 auto; padding: 28px 24px; }
h1 { font-size: 24px; margin-bottom: 20px; }
h2 { font-size: 18px; margin: 24px 0 12px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.card {
    background: #171a21; border: 1px solid #262b33; border-radius: 12px; padding: 20px;
}
.card .label { color: #8b93a0; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.card .value { font-size: 30px; font-weight: 700; margin-top: 6px; color: #fff; }
.card .value.green { color: #3ddc84; }

table { width: 100%; border-collapse: collapse; background: #171a21; border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #262b33; font-size: 14px; }
th { background: #1d212a; color: #8b93a0; font-weight: 600; text-transform: uppercase; font-size: 12px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #1c2029; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge.active { background: #14331f; color: #3ddc84; }
.badge.expired, .badge.blocked { background: #3a1a1a; color: #ff6b6b; }
.badge.none { background: #2a2e37; color: #8b93a0; }
.badge.pending { background: #332b14; color: #ffcc4a; }
.badge.completed { background: #14331f; color: #3ddc84; }

.btn {
    display: inline-block; background: #2563eb; color: #fff; border: none;
    padding: 8px 16px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 500;
}
.btn:hover { background: #1d4ed8; text-decoration: none; }
.btn.danger { background: #b3261e; }
.btn.danger:hover { background: #911d17; }
.btn.gray { background: #3a4250; }

form.inline { display: inline-block; margin: 0; }
select, input[type=text], input[type=password] {
    background: #0f1115; border: 1px solid #3a4250; color: #e6e8eb;
    padding: 8px 12px; border-radius: 8px; font-size: 14px;
}
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.msg { background: #14331f; border: 1px solid #1f5132; color: #3ddc84; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.back { color: #8b93a0; font-size: 14px; }

.login-box {
    max-width: 360px; margin: 80px auto; background: #171a21;
    border: 1px solid #262b33; border-radius: 14px; padding: 32px;
}
.login-box h1 { text-align: center; }
.login-box .row { flex-direction: column; align-items: stretch; }
.login-box input { width: 100%; }
.login-box .btn { width: 100%; margin-top: 8px; }
.err { color: #ff6b6b; text-align: center; margin-bottom: 12px; }
.muted { color: #8b93a0; font-size: 13px; }
