/**
 * Admin Dashboard Styles - Modern Light Theme
 * 
 * @package DokanRentalsBookings
 */

/* ==========================================================================
   Design Tokens
   ========================================================================== */
:root {
    --wahrb-primary: #2563eb;
    --wahrb-primary-hover: #1d4ed8;
    --wahrb-primary-light: #eff6ff;
    --wahrb-success: #10b981;
    --wahrb-success-light: #ecfdf5;
    --wahrb-warning: #f59e0b;
    --wahrb-warning-light: #fffbeb;
    --wahrb-danger: #ef4444;
    --wahrb-danger-light: #fef2f2;
    --wahrb-info: #0ea5e9;
    --wahrb-info-light: #f0f9ff;

    --wahrb-white: #ffffff;
    --wahrb-gray-50: #f8fafc;
    --wahrb-gray-100: #f1f5f9;
    --wahrb-gray-200: #e2e8f0;
    --wahrb-gray-300: #cbd5e1;
    --wahrb-gray-400: #94a3b8;
    --wahrb-gray-500: #64748b;
    --wahrb-gray-600: #475569;
    --wahrb-gray-700: #334155;
    --wahrb-gray-800: #1e293b;
    --wahrb-gray-900: #0f172a;

    --wahrb-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --wahrb-radius-sm: 0.375rem;
    --wahrb-radius-md: 0.5rem;
    --wahrb-radius-lg: 0.75rem;
    --wahrb-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --wahrb-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

/* ==========================================================================
   Admin Page Container
   ========================================================================== */
.wahrb-admin-wrap {
    max-width: 1400px;
    margin: 20px 20px 20px 0;
    font-family: var(--wahrb-font-family);
}

.wahrb-admin-wrap h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--wahrb-gray-900);
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Admin Cards Grid
   ========================================================================== */
.wahrb-admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.wahrb-admin-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--wahrb-white);
    border: 1px solid var(--wahrb-gray-200);
    border-radius: var(--wahrb-radius-lg);
}

.wahrb-admin-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--wahrb-primary-light);
    border-radius: var(--wahrb-radius-md);
    color: var(--wahrb-primary);
    font-size: 1.25rem;
}

.wahrb-admin-card-content h3 {
    margin: 0 0 0.25rem 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--wahrb-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.wahrb-admin-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--wahrb-gray-900);
    line-height: 1;
}

/* Card variants */
.wahrb-admin-card.card-success .wahrb-admin-card-icon {
    background: var(--wahrb-success-light);
    color: var(--wahrb-success);
}

.wahrb-admin-card.card-warning .wahrb-admin-card-icon {
    background: var(--wahrb-warning-light);
    color: var(--wahrb-warning);
}

.wahrb-admin-card.card-danger .wahrb-admin-card-icon {
    background: var(--wahrb-danger-light);
    color: var(--wahrb-danger);
}

.wahrb-admin-card.card-info .wahrb-admin-card-icon {
    background: var(--wahrb-info-light);
    color: var(--wahrb-info);
}

/* ==========================================================================
   Admin Section
   ========================================================================== */
.wahrb-admin-section {
    background: var(--wahrb-white);
    border: 1px solid var(--wahrb-gray-200);
    border-radius: var(--wahrb-radius-lg);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.wahrb-admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--wahrb-gray-50);
    border-bottom: 1px solid var(--wahrb-gray-200);
}

.wahrb-admin-section-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--wahrb-gray-800);
}

.wahrb-admin-section-body {
    padding: 1.5rem;
}

/* ==========================================================================
   Settings Form
   ========================================================================== */
.wahrb-settings-form {
    max-width: 800px;
}

.wahrb-settings-form .form-table {
    border-collapse: collapse;
    width: 100%;
}

.wahrb-settings-form .form-table th {
    width: 220px;
    padding: 1rem 1rem 1rem 0;
    text-align: left;
    font-weight: 500;
    color: var(--wahrb-gray-700);
    vertical-align: top;
}

.wahrb-settings-form .form-table td {
    padding: 1rem 0;
}

.wahrb-settings-form input[type="text"],
.wahrb-settings-form input[type="number"],
.wahrb-settings-form input[type="email"],
.wahrb-settings-form select,
.wahrb-settings-form textarea {
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    color: var(--wahrb-gray-800);
    background: var(--wahrb-white);
    border: 1px solid var(--wahrb-gray-300);
    border-radius: var(--wahrb-radius-md);
    outline: none;
    min-width: 280px;
}

.wahrb-settings-form input:focus,
.wahrb-settings-form select:focus,
.wahrb-settings-form textarea:focus {
    border-color: var(--wahrb-primary);
    box-shadow: 0 0 0 3px var(--wahrb-primary-light);
}

.wahrb-settings-form .description {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--wahrb-gray-500);
}

.wahrb-settings-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--wahrb-white);
    border: 1px solid var(--wahrb-gray-200);
    border-radius: var(--wahrb-radius-lg);
}

.wahrb-settings-section h2 {
    margin: 0 0 1.25rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--wahrb-gray-200);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--wahrb-gray-800);
}

/* ==========================================================================
   Tabs
   ========================================================================== */
.wahrb-admin-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0 1.5rem;
    background: var(--wahrb-gray-50);
    border-bottom: 1px solid var(--wahrb-gray-200);
}

.wahrb-admin-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--wahrb-gray-600);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.wahrb-admin-tab:hover {
    color: var(--wahrb-gray-800);
}

.wahrb-admin-tab.active {
    color: var(--wahrb-primary);
    border-bottom-color: var(--wahrb-primary);
    font-weight: 600;
}

/* ==========================================================================
   Admin Table
   ========================================================================== */
.wahrb-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.wahrb-admin-table th,
.wahrb-admin-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--wahrb-gray-100);
}

.wahrb-admin-table th {
    background: var(--wahrb-gray-50);
    font-weight: 600;
    color: var(--wahrb-gray-700);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.wahrb-admin-table tbody tr:hover {
    background: var(--wahrb-gray-50);
}

.wahrb-admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   Status Badge
   ========================================================================== */
.wahrb-admin-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.wahrb-admin-status-pending {
    background: var(--wahrb-warning-light);
    color: #b45309;
}

.wahrb-admin-status-confirmed {
    background: var(--wahrb-success-light);
    color: #047857;
}

.wahrb-admin-status-checked_in,
.wahrb-admin-status-active {
    background: var(--wahrb-info-light);
    color: #0369a1;
}

.wahrb-admin-status-completed {
    background: var(--wahrb-primary-light);
    color: var(--wahrb-primary);
}

.wahrb-admin-status-cancelled {
    background: var(--wahrb-danger-light);
    color: #b91c1c;
}

/* ==========================================================================
   Action Buttons
   ========================================================================== */
.wahrb-admin-actions {
    display: flex;
    gap: 0.375rem;
}

.wahrb-admin-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: var(--wahrb-gray-100);
    color: var(--wahrb-gray-600);
    border: none;
    border-radius: var(--wahrb-radius-sm);
    cursor: pointer;
    font-size: 0.8125rem;
    text-decoration: none;
}

.wahrb-admin-action-btn:hover {
    background: var(--wahrb-gray-200);
    color: var(--wahrb-gray-800);
}

/* ==========================================================================
   Notices
   ========================================================================== */
.wahrb-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--wahrb-white);
    border: 1px solid var(--wahrb-gray-200);
    border-left: 4px solid var(--wahrb-primary);
    border-radius: var(--wahrb-radius-md);
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

.wahrb-notice-success {
    border-left-color: var(--wahrb-success);
    background: var(--wahrb-success-light);
}

.wahrb-notice-warning {
    border-left-color: var(--wahrb-warning);
    background: var(--wahrb-warning-light);
}

.wahrb-notice-error {
    border-left-color: var(--wahrb-danger);
    background: var(--wahrb-danger-light);
}

.wahrb-notice-info {
    border-left-color: var(--wahrb-info);
    background: var(--wahrb-info-light);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.wahrb-admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-family: var(--wahrb-font-family);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: var(--wahrb-radius-md);
    cursor: pointer;
    outline: none;
}

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

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

.wahrb-admin-btn-secondary {
    background: var(--wahrb-white);
    color: var(--wahrb-gray-700);
    border: 1px solid var(--wahrb-gray-300);
}

.wahrb-admin-btn-secondary:hover {
    background: var(--wahrb-gray-50);
}

/* ==========================================================================
   Empty State
   ========================================================================== */
.wahrb-admin-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem;
    text-align: center;
}

.wahrb-admin-empty-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: var(--wahrb-gray-100);
    border-radius: 50%;
    color: var(--wahrb-gray-400);
    font-size: 1.5rem;
}

.wahrb-admin-empty h3 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--wahrb-gray-700);
}

.wahrb-admin-empty p {
    margin: 0;
    color: var(--wahrb-gray-500);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .wahrb-admin-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .wahrb-admin-wrap {
        margin: 10px;
    }

    .wahrb-admin-cards {
        grid-template-columns: 1fr;
    }

    .wahrb-admin-tabs {
        overflow-x: auto;
        padding: 0 1rem;
    }

    .wahrb-settings-form input,
    .wahrb-settings-form select {
        min-width: 100%;
    }

    .wahrb-admin-section-body {
        padding: 1rem;
    }
}