* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    min-height: 100vh;
    color: #333;
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-box {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-box h1 {
    font-size: 28px;
    margin-bottom: 8px;
    text-align: center;
    color: #2563eb;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer a {
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
}

.login-footer a:hover {
    text-decoration: underline;
}

.admin-header {
    background: white;
    padding: 16px 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    border-bottom: 1px solid #e5e7eb;
}

.admin-header h1 {
    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #64748b;
}

.admin-info strong {
    color: #0f172a;
    font-weight: 500;
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: 6px;
    margin-left: 8px;
    margin-right: 8px;
}

.admin-info .btn-small {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 6px;
    background: white;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-weight: 500;
}

.admin-info .btn-small:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 32px 32px;
}

.page-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-title h2 {
    margin: 0;
    color: #1e293b;
    font-size: 24px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.stat-card {
    background: white;
    padding: 12px 8px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    color: #2563eb;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.action-buttons {
    background: white;
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.action-buttons h2 {
    margin-bottom: 12px;
    color: #333;
    font-size: 17px;
    text-align: center;
}

.button-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.button-grid .btn {
    width: 100%;
    max-width: 400px;
    padding: 10px 20px;
    background: #2563eb;
    color: white;
    display: block;
    text-align: center;
}

.button-grid .btn:hover {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.backup-section {
    margin-bottom: 20px;
}

.backup-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.btn-backup {
    background: #f59e0b;
    color: white;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-backup:hover {
    background: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35);
}

.btn-restore {
    background: #0891b2;
    color: white;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.25);
}

.btn-restore:hover {
    background: #0e7490;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(8, 145, 178, 0.35);
}

.backup-info {
    color: #64748b;
    font-size: 13px;
    margin: 0;
    text-align: center;
}

.form-container {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.form-container h2 {
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group input[disabled] {
    background: #f5f5f5;
    color: #999;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-large {
    padding: 16px 28px;
    font-size: 16px;
}

.btn-edit {
    background: #4caf50;
    color: white;
    padding: 8px 16px;
    font-size: 13px;
}

.btn-edit:hover {
    background: #45a049;
}

.btn-delete {
    background: #f44336;
    color: white;
    padding: 8px 16px;
    font-size: 13px;
}

.btn-delete:hover {
    background: #da190b;
}

.toolbar {
    background: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.count {
    color: #666;
    font-size: 14px;
    font-weight: 600;
}

.data-table {
    width: 100%;
    background: white;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.data-table thead {
    background: #f8f9fa;
}

.data-table th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
}

.data-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table td:last-child {
    text-align: center;
    white-space: nowrap;
}

.data-table .btn {
    margin: 0 5px;
}

.url-cell a {
    color: #2563eb;
    text-decoration: none;
    word-break: break-all;
}

.url-cell a:hover {
    text-decoration: underline;
}

td.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.empty-state {
    text-align: center;
    padding: 40px !important;
    color: #999;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #c62828;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #2e7d32;
}

.quick-links {
    text-align: center;
    margin-top: 30px;
}

.recovery-section {
    background: #fff3cd;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    border-left: 4px solid #ffc107;
}

.recovery-section h3 {
    color: #856404;
    margin-bottom: 10px;
}

.recovery-section code {
    display: block;
    background: #fff;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 12px;
    word-break: break-all;
}

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .data-table {
        font-size: 14px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px;
    }
    
    td.action-buttons {
        flex-direction: column;
    }
}
