/* OOH Project Manager - Design System */

@font-face {
    font-family: 'Araboto';
    src: url('../fonts/Araboto-Normal-400.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Araboto';
    src: url('../fonts/Araboto-Bold-400.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

:root {
    /* Brand Colors */
    --color-white: #ffffff;
    --color-ice: #c7f1ff;
    --color-cyan: #52cdef;
    --color-teal: #42b0d5;
    --color-navy: #034a5d;

    /* Semantic Colors */
    --color-success: #10b981;
    --color-success-light: #d1fae5;
    --color-warning: #f59e0b;
    --color-warning-light: #fef3c7;
    --color-danger: #ef4444;
    --color-danger-light: #fee2e2;
    --color-slate: #64748b;
    --color-slate-light: #f1f5f9;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(3, 74, 93, 0.1);
    --shadow-md: 0 4px 12px rgba(3, 74, 93, 0.15);
    --shadow-lg: 0 10px 25px rgba(3, 74, 93, 0.2);
    --shadow-xl: 0 20px 40px rgba(3, 74, 93, 0.25);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;

    /* Sidebar */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;

    --font-family: 'Araboto', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, var(--color-ice) 0%, var(--color-white) 100%);
    min-height: 100vh;
    color: var(--color-navy);
    line-height: 1.6;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page {
    padding: 40px 20px;
    margin: 0 auto;
}

/* Navigation */
.nav {
    background: var(--color-navy);
    padding: 16px 0;
    box-shadow: var(--shadow-md);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-brand {
    color: var(--color-white);
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.nav-links a {
    color: var(--color-ice);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-cyan);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--color-ice);
}

.nav-user span {
    font-size: 0.9rem;
}

/* Cards */
.card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 24px;
    margin-bottom: 20px;
    transition: all var(--transition-fast);
}

.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    border-bottom: 1px solid var(--color-ice);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-navy);
}

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

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--color-navy);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--color-ice);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--color-white);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-cyan);
    box-shadow: 0 0 0 3px rgba(82, 205, 239, 0.2);
}

.form-input::placeholder {
    color: #94a3b8;
}

textarea.form-input {
    min-height: 120px;
    resize: vertical;
}

.form-select {
    width: 100%;
    padding: 12px 40px 12px 16px; /* Extra padding for arrow */
    border: 2px solid var(--color-ice);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    color: var(--color-navy);
    background-color: var(--color-white);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23034a5d'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--color-cyan);
    box-shadow: 0 0 0 3px rgba(82, 205, 239, 0.2);
}

.form-select:hover {
    border-color: var(--color-teal);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit; /* Fallback */
}

/* Ensure visited links don't change color */
.btn:visited {
    color: inherit;
}

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

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

.btn-primary:hover {
    background: var(--color-navy);
    transform: translateY(-1px);
    color: var(--color-white);
}

.btn-secondary {
    background: var(--color-ice);
    color: var(--color-navy);
}

.btn-secondary:visited {
    color: var(--color-navy);
}

.btn-secondary:hover {
    background: var(--color-cyan);
    color: var(--color-white);
}

.btn-info {
    background: #0ea5e9; /* Sky 500 */
    color: var(--color-white);
}

.btn-info:visited {
    color: var(--color-white);
}

.btn-info:hover {
    background: #0284c7; /* Sky 600 */
    color: var(--color-white);
}

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

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

.btn-danger:hover {
    background: #dc2626;
    color: var(--color-white);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

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

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--color-ice);
}

.table th {
    background: var(--color-ice);
    font-weight: 600;
    color: var(--color-navy);
}

.table tr:hover {
    background: rgba(199, 241, 255, 0.3);
}

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

/* Autocomplete */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    border: 2px solid var(--color-cyan);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.autocomplete-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s;
}

.autocomplete-item:hover {
    background: var(--color-ice);
}

/* Tags / Chips */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--color-ice);
    color: var(--color-navy);
    border-radius: 20px;
    font-size: 0.875rem;
}

.tag-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-navy);
    font-size: 1rem;
    line-height: 1;
    opacity: 0.6;
}

.tag-remove:hover {
    opacity: 1;
    color: #ef4444;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

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

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

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

.login-card {
    width: 100%;
    max-width: 400px;
}

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

.login-header h1 {
    font-size: 1.5rem;
    color: var(--color-navy);
    margin-bottom: 8px;
}

.login-header p {
    color: #64748b;
}

/* Page Headers */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-navy);
}

/* Section Headers */
.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-navy);
    margin: 24px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-ice);
}

/* Image Upload */
.image-upload {
    border: 2px dashed var(--color-cyan);
    border-radius: var(--radius-md);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.image-upload:hover {
    background: var(--color-ice);
}

.image-upload input[type="file"] {
    display: none;
}

.image-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-md);
    margin-top: 16px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: var(--color-navy);
}

/* Grid Layout */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .nav-content {
        flex-direction: column;
        gap: 16px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Dynamic List */
.dynamic-list {
    border: 1px solid var(--color-ice);
    border-radius: var(--radius-md);
    padding: 16px;
}

.dynamic-list-item {
    display: flex;
    gap: 12px;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-ice);
}

.dynamic-list-item:last-child {
    border-bottom: none;
}

.dynamic-list-add {
    margin-top: 12px;
}

/* Plan View */
.plan-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.plan-detail dt {
    font-weight: 500;
    color: #64748b;
}

.plan-detail dd {
    color: var(--color-navy);
}

/* ============================================
   SIDEBAR LAYOUT (PRO MAX)
   ============================================ */
.layout-sidebar {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--color-navy);
    /* Modern Gradient */
    background: linear-gradient(180deg, #023e4e 0%, #034a5d 100%);
    color: var(--color-white);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-base);
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
}

.sidebar-header {
    padding: 28px 24px;
    background: rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-logo {
    max-width: 150px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Sidebar Links */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-base);
    border-radius: var(--radius-md);
    border-left: none; /* Removed old style */
    position: relative;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-white);
    transform: translateX(4px);
}

/* Active State - Glassmorphism */
.sidebar-link.active {
    background: rgba(82, 205, 239, 0.15);
    color: var(--color-cyan);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid rgba(82, 205, 239, 0.2);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 3px;
    background: var(--color-cyan);
    border-radius: 0 4px 4px 0;
    display: none; /* Removing the side bar indicator for card style */
}

.sidebar-link svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    opacity: 0.8;
    transition: transform 0.2s;
}

.sidebar-link.active svg {
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(82, 205, 239, 0.4));
}

/* Project Context Section */
.sidebar-section {
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius-lg);
    padding: 16px 8px;
    margin: 16px 0;
    border: 1px solid rgba(255,255,255,0.05);
}

.sidebar-label {
    display: block;
    padding: 0 12px 12px 12px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.4);
    font-weight: 700;
}

.sidebar-footer {
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--color-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 12px;
    color: var(--color-ice);
    opacity: 0.8;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    background: linear-gradient(135deg, var(--color-ice) 0%, var(--color-white) 100%);
    min-height: 100vh;
}

.main-content .page {
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Mobile Toggle */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 101;
    background: var(--color-navy);
    color: var(--color-white);
    border: none;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.sidebar-toggle svg {
    width: 24px;
    height: 24px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

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

.metric-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-ice);
    transition: all var(--transition-fast);
}

.metric-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.metric-icon svg {
    width: 24px;
    height: 24px;
}

.metric-icon.cyan {
    background: rgba(82, 205, 239, 0.15);
    color: var(--color-teal);
}

.metric-icon.success {
    background: var(--color-success-light);
    color: var(--color-success);
}

.metric-icon.warning {
    background: var(--color-warning-light);
    color: var(--color-warning);
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-navy);
    line-height: 1.2;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--color-slate);
    margin-top: 4px;
}

/* ============================================
   LOGIN SPLIT SCREEN
   ============================================ */
.login-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.login-brand {
    background: var(--color-navy);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--color-white);
}

.login-brand-logo {
    max-width: 200px;
    margin-bottom: 32px;
}

.login-brand h1 {
    font-size: 2rem;
    margin-bottom: 16px;
    text-align: center;
}

.login-brand p {
    color: var(--color-ice);
    text-align: center;
    max-width: 300px;
    line-height: 1.6;
}

.login-form-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--color-white);
}

.login-form-wrapper {
    width: 100%;
    max-width: 400px;
}

.login-form-wrapper h2 {
    font-size: 1.5rem;
    color: var(--color-navy);
    margin-bottom: 8px;
}

.login-form-wrapper .subtitle {
    color: var(--color-slate);
    margin-bottom: 32px;
}

/* ============================================
   STATUS BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-success {
    background: var(--color-success-light);
    color: var(--color-success);
}

.badge-warning {
    background: var(--color-warning-light);
    color: var(--color-warning);
}

.badge-danger {
    background: var(--color-danger-light);
    color: var(--color-danger);
}

.badge-info {
    background: rgba(82, 205, 239, 0.15);
    color: var(--color-teal);
}

.badge-neutral {
    background: var(--color-slate-light);
    color: var(--color-slate);
}

/* ============================================
   ADMIN CARDS
   ============================================ */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.admin-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-ice);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-base);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.admin-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--color-cyan);
}

.admin-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.admin-card-icon svg {
    width: 28px;
    height: 28px;
}

.admin-card-icon.cyan {
    background: rgba(82, 205, 239, 0.15);
    color: var(--color-teal);
}

.admin-card-icon.teal {
    background: rgba(66, 176, 213, 0.15);
    color: var(--color-teal);
}

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

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

.admin-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-navy);
    margin-bottom: 4px;
}

.admin-card-count {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: 8px;
}

.admin-card-description {
    font-size: 0.875rem;
    color: var(--color-slate);
    flex: 1;
}

.admin-card-action {
    margin-top: 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-teal);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================
   SEARCH & FILTERS BAR
   ============================================ */
.filters-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.search-input-wrapper {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-input-wrapper svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--color-slate);
}

.search-input-wrapper input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid var(--color-ice);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--color-cyan);
}

.filter-select {
    padding: 12px 16px;
    border: 2px solid var(--color-ice);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: var(--color-white);
    cursor: pointer;
    min-width: 150px;
}

/* ============================================
   ENHANCED TABLE
   ============================================ */
.table-wrapper {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-wrapper .table {
    margin: 0;
}

.table-wrapper .table th {
    background: var(--color-slate-light);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-slate);
}

.table-wrapper .table td {
    vertical-align: middle;
}

.table-wrapper .table tr {
    transition: background var(--transition-fast);
}

.table-wrapper .table tbody tr:hover {
    background: rgba(199, 241, 255, 0.3);
}

/* ============================================
   SECTION IMPROVEMENTS
   ============================================ */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-ice);
}

.section-header svg {
    width: 24px;
    height: 24px;
    color: var(--color-teal);
}

.section-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-navy);
}

/* ============================================
   UTILITY CLASSES (Mini-Bootstrap)
   ============================================ */

/* Flexbox */
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.justify-content-end { justify-content: flex-end; }
.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

/* Spacing */
.m-0 { margin: 0 !important; }
.m-3 { margin: 12px !important; }
.mt-3 { margin-top: 12px !important; }
.mt-auto { margin-top: auto !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 12px !important; }
.mb-4 { margin-bottom: 16px !important; }
.ms-1 { margin-left: 4px !important; }
.ms-2 { margin-left: 8px !important; }
.me-1 { margin-right: 4px !important; }
.pt-3 { padding-top: 12px !important; }
.px-3 { padding-left: 12px !important; padding-right: 12px !important; }
.py-5 { padding-top: 48px !important; padding-bottom: 48px !important; }

/* Text */
.text-center { text-align: center; }
.text-start { text-align: left; }
.text-end { text-align: right; }
.text-muted { color: #94a3b8 !important; }
.text-primary { color: var(--color-teal) !important; }
.text-dark { color: var(--color-navy) !important; }
.fw-bold { font-weight: 700 !important; }
.small { font-size: 0.875rem; }
.text-decoration-none { text-decoration: none !important; }
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Position */
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.top-0 { top: 0; }
.end-0 { right: 0; }

/* Borders & Rounded */
.border-0 { border: none !important; }
.border-top { border-top: 1px solid var(--color-ice) !important; }
.rounded-pill { border-radius: 9999px !important; }

/* Backgrounds */
.bg-light { background-color: var(--color-slate-light) !important; }
.bg-primary { background-color: var(--color-teal) !important; }
.bg-success { background-color: var(--color-success-light) !important; color: var(--color-success); }
.bg-warning { background-color: var(--color-warning-light) !important; color: var(--color-warning); }
.bg-secondary { background-color: var(--color-slate-light) !important; color: var(--color-slate); }

/* Sizing */
.w-100 { width: 100%; }
.h-100 { height: 100%; }
.opacity-50 { opacity: 0.5; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }

/* Grid System (Simplified) */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-success {
    color: var(--color-success);
}

.text-warning {
    color: var(--color-warning);
}

.text-danger {
    color: var(--color-danger);
}

.text-slate {
    color: var(--color-slate);
}

.text-navy {
    color: var(--color-navy);
}

.bg-success-light {
    background: var(--color-success-light);
}

.bg-warning-light {
    background: var(--color-warning-light);
}

.bg-danger-light {
    background: var(--color-danger-light);
}

.mt-0 {
    margin-top: 0;
}

.mt-4 {
    margin-top: 16px;
}

.mt-6 {
    margin-top: 24px;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 8px;
}

.gap-4 {
    gap: 16px;
}

/* ============================================
   RESPONSIVE - TABLET (768px)
   ============================================ */
@media (max-width: 1023px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: flex;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .main-content .page {
        padding: 24px 16px;
        padding-top: 72px;
    }

    .login-split {
        grid-template-columns: 1fr;
    }

    .login-brand {
        display: none;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Responsive Tables to Cards */
    .table-wrapper {
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }

    .table, .table thead, .table tbody, .table th, .table td, .table tr {
        display: block;
    }

    .table thead {
        display: none;
    }

    .table tr {
        background: var(--color-white);
        border-radius: var(--radius-lg);
        padding: 20px;
        margin-bottom: 16px;
        box-shadow: var(--shadow-sm);
        border: 1px solid var(--color-ice);
    }

    .table td {
        padding: 8px 0;
        border-bottom: 1px solid var(--color-ice);
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
    }

    .table td:last-child {
        border-bottom: none;
        padding-top: 16px;
        justify-content: center;
    }

    .table td::before {
        content: attr(data-label);
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.75rem;
        color: var(--color-slate);
        text-align: left;
    }

    .table-actions {
        width: 100%;
        justify-content: stretch !important;
    }

    .table-actions .btn {
        flex: 1;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (480px)
   ============================================ */
@media (max-width: 767px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }

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

    .filters-bar {
        flex-direction: column;
    }

    .search-input-wrapper {
        width: 100%;
    }

    .filter-select {
        width: 100%;
    }

    .table-actions {
        flex-direction: column;
        gap: 4px;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
    }

    .plan-detail {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE (375px)
   ============================================ */
@media (max-width: 479px) {
    .main-content .page {
        padding: 16px 12px;
        padding-top: 72px;
    }

    .card {
        padding: 16px;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .metric-value {
        font-size: 1.5rem;
    }
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    display: block;
}

#lightboxCaption {
    color: var(--color-white);
    text-align: center;
    margin-top: 16px;
    font-size: 1.1rem;
    font-weight: 500;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--color-white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: transform 0.2s;
    line-height: 1;
}

.lightbox-close:hover {
    transform: scale(1.1);
    color: var(--color-cyan);
}

/* ============================================
   GANTT TABLE
   ============================================ */
.gantt-scroll-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.gantt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    min-width: 900px;
}

.gantt-table thead {
    background: var(--color-dark);
    color: white;
}

.gantt-table th {
    padding: 8px 4px;
    text-align: center;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
}

.gantt-table td {
    padding: 6px 4px;
    border: 1px solid var(--color-ice);
    text-align: center;
    vertical-align: middle;
}

.gantt-table tbody tr {
    transition: background-color 0.15s ease;
}

.gantt-table tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

.gantt-col-project {
    text-align: left !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    min-width: 180px;
    max-width: 220px;
    position: sticky;
    left: 0;
    z-index: 2;
    background: white;
}

thead .gantt-col-project {
    background: var(--color-dark);
    z-index: 3;
}

.gantt-col-weekday {
    font-size: 0.65rem;
    font-weight: 500;
    padding: 2px 4px !important;
    color: var(--color-navy)
}

.gantt-weekend {
    color: #fbbf24 !important;
}

.gantt-col-day {
    width: 28px;
    min-width: 28px;
    max-width: 28px;
    height: 32px;
    color: var(--color-navy)
}

.gantt-active {
    border-radius: 0;
    border-color: rgba(255,255,255,0.3) !important;
}

.gantt-project-link {
    color: var(--color-dark);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
}

.gantt-project-link:hover {
    color: var(--color-teal);
}

/* Gantt Filters */
.gantt-filters {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.gantt-filter-select {
    padding: 6px 10px;
    border: 1px solid var(--color-ice);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--color-dark);
    font-size: 0.85rem;
    cursor: pointer;
    appearance: auto;
}

.gantt-filter-select:focus {
    outline: none;
    border-color: var(--color-teal);
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
}

/* Legend */
.gantt-legend {
    display: flex;
    gap: 16px;
    padding: 12px 16px;
    border-top: 1px solid var(--color-ice);
    flex-wrap: wrap;
}

.gantt-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--color-slate);
}

.gantt-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

/* Pagination */
.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-top: 1px solid var(--color-ice);
    flex-wrap: wrap;
}

.pagination-left, .pagination-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-info {
    font-size: 0.85rem;
    color: var(--color-slate);
    font-weight: 500;
}

/* Sortable Headers */
.sortable-th {
    cursor: pointer;
}

.sort-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.sort-link:hover {
    color: var(--color-teal);
}

.sort-link.active {
    color: var(--color-teal);
}