/* Admin Panel Styles */
:root {
    --admin-primary: #3C70EF;
    --admin-primary-dark: #2d5ad0;
    --admin-purple: #B97DFF;
    --admin-light-purple: #FAF6FF;
    --admin-sidebar-bg: #1e293b;
    --admin-sidebar-text: #e2e8f0;
    --admin-success: #10b981;
    --admin-warning: #f59e0b;
    --admin-danger: #ef4444;
    --admin-gray: #64748b;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background: #f1f5f9;
    color: #1e293b;
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 250px;
    background: var(--admin-sidebar-bg);
    color: var(--admin-sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.admin-logo {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-logo h2 {
    color: var(--admin-primary);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.admin-logo span {
    font-size: 0.85rem;
    color: #94a3b8;
}

.admin-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--admin-sidebar-text);
    text-decoration: none;
    transition: all 0.2s;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
}

.nav-item.active {
    background: var(--admin-primary);
    color: white;
}

.nav-icon {
    font-size: 1.2rem;
}

.nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 20px 0;
}

.nav-item.logout {
    color: #f87171;
}

.admin-user {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
}

.admin-user span {
    display: block;
    color: #94a3b8;
    margin-bottom: 4px;
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: 250px;
    padding: 30px;
}

.admin-main.full-width {
    margin-left: 0;
}

/* Page Header */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-header h1 {
    font-size: 1.75rem;
    color: #1e293b;
}

/* Cards */
.admin-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.admin-card h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #334155;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card .stat-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--admin-primary);
}

.stat-card .stat-label {
    font-size: 0.9rem;
    color: var(--admin-gray);
    margin-top: 5px;
}

/* Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.admin-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.admin-table tr:hover {
    background: #f8fafc;
}

.admin-table .actions {
    display: flex;
    gap: 8px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--admin-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--admin-primary-dark);
}

.btn-success {
    background: var(--admin-success);
    color: white;
}

.btn-warning {
    background: var(--admin-warning);
    color: white;
}

.btn-danger {
    background: var(--admin-danger);
    color: white;
}

.btn-secondary {
    background: #e2e8f0;
    color: #475569;
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Forms */
.admin-form {
    max-width: 800px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #334155;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(60, 112, 239, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

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

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background: #e2e8f0;
    color: #475569;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 10px;
    color: var(--admin-primary);
}

.login-box .subtitle {
    text-align: center;
    color: var(--admin-gray);
    margin-bottom: 30px;
}

/* Application View */
.application-details {
    display: grid;
    gap: 20px;
}

.detail-section {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
}

.detail-section h4 {
    color: var(--admin-primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.detail-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 500;
    color: #475569;
}

.detail-value {
    color: #1e293b;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--admin-gray);
}

.empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #475569;
}

/* Status Tabs */
.status-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    align-items: center;
}

.status-tab {
    display: inline-block;
    padding: 8px 16px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s ease;
}

.status-tab:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.status-tab.active {
    background: var(--admin-primary);
    border-color: var(--admin-primary);
    color: white;
}

.status-tab-divider {
    color: #cbd5e1;
    margin: 0 5px;
}

.status-tab-archived {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

.status-tab-archived:hover {
    background: #fde68a;
}

.status-tab-archived.active {
    background: #f59e0b;
    border-color: #f59e0b;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 70px;
        overflow: hidden;
    }
    
    .admin-sidebar:hover {
        width: 250px;
    }
    
    .admin-main {
        margin-left: 70px;
    }
    
    .nav-item span:not(.nav-icon) {
        display: none;
    }
    
    .admin-sidebar:hover .nav-item span {
        display: inline;
    }
    
    .admin-logo span,
    .admin-user {
        display: none;
    }
    
    .admin-sidebar:hover .admin-logo span,
    .admin-sidebar:hover .admin-user {
        display: block;
    }
}
