/* Dashboard Redesign - New Tab Styles */

/* Base Container */
.dashboard-tabs-container {
    display: flex;
    gap: 1rem;
    padding: 0.5rem;
    overflow-x: auto;
    /* Allow scrolling on small screens */
    margin-bottom: 2rem;
    border-radius: var(--radius-lg);
}

/* Base Tab Button */
.dashboard-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    font-family: 'Rubik', sans-serif;
}

.dashboard-tab-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    transition: transform 0.3s ease;
}

.dashboard-tab-label {
    font-weight: 500;
    font-size: 1rem;
}

/* --- OPTION 1: Modern Clean Cards (Apple/iOS inspired) --- */
.theme-clean-cards {
    background: transparent;
}

.theme-clean-cards .dashboard-tab {
    background: white;
    color: var(--text-muted);
    border-radius: 16px;
    padding: 1.25rem 2rem;
    min-width: 120px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid transparent;
}

.theme-clean-cards .dashboard-tab:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    color: var(--primary);
}

.theme-clean-cards .dashboard-tab.active {
    background: #f0f9ff;
    /* Very light blue */
    color: var(--primary);
    border-color: rgba(59, 130, 246, 0.2);
    /* Subtle primary border */
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1), 0 2px 4px -1px rgba(59, 130, 246, 0.06);
}

.theme-clean-cards .dashboard-tab.active .dashboard-tab-icon {
    transform: scale(1.1);
}

/* --- OPTION 2: Vibrant Gradient Pills (Material You / Spotify inspired) --- */
.theme-vibrant-pills {
    background: white;
    padding: 1rem;
    border-radius: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    justify-content: center;
}

.theme-vibrant-pills .dashboard-tab {
    background: transparent;
    color: var(--text-muted);
    border-radius: 50px;
    /* Pill shape */
    padding: 0.75rem 2rem;
    flex-direction: row;
    /* Horizontal layout for pills */
    min-width: auto;
}

.theme-vibrant-pills .dashboard-tab-icon {
    font-size: 1.2rem;
    margin-bottom: 0;
    margin-left: 0.5rem;
}

.theme-vibrant-pills .dashboard-tab:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-main);
}

.theme-vibrant-pills .dashboard-tab.active {
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.theme-vibrant-pills .dashboard-tab.active .dashboard-tab-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .dashboard-tabs-container {
        padding-bottom: 1rem;
    }

    .theme-clean-cards .dashboard-tab {
        padding: 1rem;
        min-width: 100px;
    }

    .dashboard-tab-label {
        font-size: 0.9rem;
    }
}


/* ========================================= */
/*       MODERN SIDEBAR REDESIGN            */
/* ========================================= */

/* ====================================
   SIDEBAR — Muted Slate (overrides)
====================================*/
.sidebar {
    background: var(--sidebar-bg, #f8fafc);
    border-left: 1px solid var(--sidebar-border, #e2e8f0);
    box-shadow: none;
    padding: 1.5rem 0;
    width: 260px;
    flex-shrink: 0;
}

.sidebar-brand {
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #0f172a;
    margin-bottom: 1.5rem;
    padding: 0 1.5rem 1.25rem;
    border-bottom: 1px solid var(--sidebar-border, #e2e8f0);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nav-link {
    font-family: 'Rubik', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.65rem 1.5rem;
    color: var(--sidebar-text, #475569);
    text-decoration: none;
    border-radius: 0;
    transition: background 0.15s, color 0.15s;
    font-weight: 400;
    font-size: 0.95rem;
    margin: 0;
    border: none;
    border-right: 3px solid transparent;
    position: relative;
}

.nav-link span:first-child {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.nav-link:hover {
    background-color: var(--sidebar-hover-bg, #f1f5f9);
    color: var(--sidebar-text-active, #0f172a);
    transform: none;
}

.nav-link.active {
    background-color: var(--sidebar-active-bg, #e2e8f0);
    color: var(--sidebar-text-active, #0f172a);
    font-weight: 600;
    border-right-color: var(--sidebar-accent, #4f46e5);
    box-shadow: none;
}

.nav-link.active span:first-child {
    transform: none;
}

/* Quick links section */
.sidebar div[style*="border-top"] {
    border-top: 1px solid var(--sidebar-border, #e2e8f0) !important;
    margin-top: 1.5rem !important;
    padding-top: 0.75rem !important;
}

.sidebar p[style*="text-muted"] {
    font-family: 'Rubik', sans-serif;
    font-size: 0.7rem !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8 !important;
    padding-right: 1.5rem !important;
    margin-bottom: 0.5rem !important;
    font-weight: 600;
}

.sidebar div[style*="margin-top: 1rem"] .nav-link {
    padding: 0.55rem 1.5rem;
    font-size: 0.9rem;
}

/* =========================================================================
   WORKSPACE REDESIGN: TABLES & SURFACES (Clean Cards / Apple HIG)
   ========================================================================= */

/* Surface Level 0 - Overall Background */
body.workspace-clean {
    background-color: #f8fafc; /* Very light slate, almost pure white */
}

/* Clean Tables Rule: No dark borders, separate rows, soft shadows */
.clean-table {
    border-collapse: separate;
    border-spacing: 0 0.5rem;
    width: 100%;
}

.clean-table th {
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 0.75rem 1.25rem;
    border-bottom: 2px solid #e2e8f0;
    background: transparent;
    border-top: none;
    border-left: none;
    border-right: none;
}

.clean-table tbody tr {
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
    border-radius: 12px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.clean-table tbody tr:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
}

.clean-table td {
    padding: 0.85rem 1.25rem;
    font-family: 'Rubik', sans-serif;
    font-size: 0.95rem;
    color: #334155;
    border: none;
    vertical-align: middle;
}

/* Make sure first and last cell in row get the rounded corners */
.clean-table tbody tr td:first-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}
.clean-table tbody tr td:last-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

/* Status Badges - Apple Style */
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-family: 'Rubik', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
}

.status-pill.open {
    background-color: #fef2f2;
    color: #ef4444;
}

.status-pill.progress {
    background-color: #fffbeb;
    color: #f59e0b;
}

.status-pill.closed {
    background-color: #f0fdf4;
    color: #10b981;
}

.status-pill.draft {
    background-color: #f1f5f9;
    color: #64748b;
}

/* Navigation Pills (Top Tabs) */
.pill-nav {
    display: flex;
    gap: 0.5rem;
    background: #e2e8f0;
    padding: 0.35rem;
    border-radius: 9999px;
    width: max-content;
    margin-bottom: 1.5rem;
}

.pill-nav-item {
    font-family: 'Rubik', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
}

.pill-nav-item:hover {
    color: #0f172a;
}

.pill-nav-item.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Clean Form Controls */
.clean-input {
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 0.65rem 1rem;
    font-family: 'Rubik', sans-serif;
    color: #334155;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}
.clean-input:focus {
    outline: none;
    border-color: var(--primary, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background-color: #ffffff;
}

.clean-input-sm {
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    font-family: 'Rubik', sans-serif;
    color: #334155;
    font-size: 0.85rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}
.clean-input-sm:focus {
    outline: none;
    border-color: var(--primary, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background-color: #ffffff;
}

/* Primary Button Apple Style */
.btn-apple {
    background: linear-gradient(180deg, var(--primary, #3b82f6) 0%, #2563eb 100%);
    color: white;
    border: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0.65rem 1.25rem;
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}
.btn-apple:hover {
    background: linear-gradient(180deg, #60a5fa 0%, var(--primary, #3b82f6)  100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2), 0 2px 4px -2px rgba(37, 99, 235, 0.1);
}
.btn-apple:active {
    transform: translateY(0);
    background: #1d4ed8;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}