* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 16px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 32px 24px;
}

.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-header h1 {
    font-size: 22px;
    color: #333;
    margin-bottom: 4px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 16px;
}

.login-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.login-form input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e1e5ea;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}

.login-form input:focus {
    outline: none;
    border-color: #667eea;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 12px;
}

.navbar {
    background: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    flex-wrap: wrap;
    gap: 8px;
}

.nav-brand {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #666;
    flex-wrap: wrap;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 16px;
}

@media (min-width: 500px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 18px 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.stat-card.stat-green { border-left: 4px solid #22c55e; }
.stat-card.stat-red { border-left: 4px solid #ef4444; }

.stat-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

@media (min-width: 768px) {
    .stat-value {
        font-size: 28px;
    }
}

.stat-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-top: 16px;
}

.card-header {
    padding: 14px 16px;
    border-bottom: 1px solid #eef0f2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
}

.card-body {
    padding: 16px;
}

@media (min-width: 768px) {
    .card-header {
        padding: 20px 24px;
    }
    .card-body {
        padding: 24px;
    }
    .container {
        padding: 30px 20px;
    }
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -16px;
    padding: 0 16px;
}

@media (min-width: 768px) {
    .table-responsive {
        margin: 0;
        padding: 0;
    }
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.table th {
    text-align: left;
    padding: 10px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #eef0f2;
    white-space: nowrap;
}

.table td {
    padding: 10px 10px;
    border-bottom: 1px solid #eef0f2;
    font-size: 13px;
    white-space: nowrap;
}

.table tbody tr:active {
    background: #f0f2f5;
}

@media (min-width: 768px) {
    .table th { padding: 12px 14px; }
    .table td { padding: 12px 14px; font-size: 14px; }
    .table tbody tr:hover { background: #f8f9fa; }
}

.action-cell {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    -webkit-appearance: none;
    text-align: center;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: #667eea;
    color: #fff;
}

.btn-primary:hover {
    background: #5a6fd6;
}

.btn-secondary {
    background: #e1e5ea;
    color: #555;
}

.btn-secondary:hover {
    background: #d1d5db;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 7px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    display: block;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 12px;
    border: 2px solid #e1e5ea;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 600px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
}

.alert {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
}

.alert-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #dcfce7;
    color: #16a34a;
}

.badge-danger {
    background: #fef2f2;
    color: #dc2626;
}

.text-muted {
    color: #999;
    font-size: 14px;
}

.text-green {
    color: #16a34a;
    font-weight: 600;
}

.text-red {
    color: #dc2626;
    font-weight: 600;
}

.text-center {
    text-align: center;
}
