/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    min-height: 100vh;
}

/* ============ LOGIN PAGE ============ */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

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

.login-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.login-header h1 {
    font-size: 24px;
    color: #1a1a2e;
}

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

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

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

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

.login-form input:focus {
    border-color: #302b63;
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: #302b63;
    color: #fff;
}

.btn-primary:hover {
    background: #24243e;
}

.btn-outline {
    background: transparent;
    color: #302b63;
    border: 2px solid #302b63;
}

.btn-outline:hover {
    background: #302b63;
    color: #fff;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 16px;
}

/* ============ ALERTS ============ */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-error {
    background: #fee;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #eafbe7;
    color: #27ae60;
    border: 1px solid #a3d9a5;
}

/* ============ NAVBAR ============ */
.navbar {
    background: linear-gradient(135deg, #0f0c29, #302b63);
    padding: 0 30px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-icon {
    font-size: 24px;
}

.navbar-title {
    font-size: 18px;
    font-weight: 700;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-user {
    font-size: 14px;
    opacity: 0.9;
}

.navbar .btn-outline {
    color: #fff;
    border-color: rgba(255,255,255,0.4);
    padding: 6px 14px;
}

.navbar .btn-outline:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
}

/* ============ MAIN CONTENT ============ */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* ============ TABS ============ */
.tabs {
    display: flex;
    gap: 4px;
    background: #fff;
    padding: 6px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.tab {
    padding: 10px 24px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.tab:hover {
    background: #f0f2f5;
    color: #333;
}

.tab.active {
    background: #302b63;
    color: #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============ STATS CARDS ============ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border-left: 4px solid #302b63;
}

.stat-card-success { border-left-color: #27ae60; }
.stat-card-error { border-left-color: #e74c3c; }
.stat-card-info { border-left-color: #3498db; }

.stat-label {
    font-size: 13px;
    color: #888;
    font-weight: 500;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
}

/* ============ FILTERS ============ */
.filters-bar {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    background: #fff;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: #888;
}

.filter-input {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.filter-input:focus {
    border-color: #302b63;
}

/* ============ TABLE ============ */
.table-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.table-header h3 {
    font-size: 16px;
    color: #1a1a2e;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f8f9fa;
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
}

.data-table tr:hover {
    background: #fafbfc;
}

.details-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty-state {
    text-align: center;
    color: #aaa;
    padding: 40px 16px !important;
    font-style: italic;
}

/* ============ STATUS BADGES ============ */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-success {
    background: #eafbe7;
    color: #27ae60;
}

.status-failed, .status-error {
    background: #fee;
    color: #e74c3c;
}

.status-pending {
    background: #fff8e1;
    color: #f39c12;
}

/* ============ LOADING ============ */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: #888;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e0e0e0;
    border-top-color: #302b63;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .navbar { padding: 0 16px; }
    .main-content { padding: 16px; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .filters-bar { flex-direction: column; align-items: stretch; }
    .data-table { font-size: 13px; }
    .data-table th, .data-table td { padding: 8px 10px; }
}
