/* Yacht Building Dashboard - Premium CSS */

:root {
    --bg-main: #0b1329;
    --bg-sidebar: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #0f172a;
    --border-color: #334155;
    
    /* Brand Colors */
    --primary: #0284c7; /* Ocean Blue */
    --primary-hover: #0369a1;
    --primary-glow: rgba(2, 132, 199, 0.25);
    
    /* Status Colors */
    --color-todo: #64748b;
    --color-inprogress: #f59e0b;
    --color-review: #8b5cf6;
    --color-done: #10b981;
    --color-overdue: #ef4444;
    
    /* Text Colors */
    --text-title: #f8fafc;
    --text-body: #cbd5e1;
    --text-muted: #64748b;
    
    /* Font Stack */
    --font-primary: 'Outfit', 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Miscellaneous */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-main);
    color: var(--text-body);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Application Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 100;
}

.sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.brand-icon {
    width: 36px;
    height: 36px;
    color: var(--primary);
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.brand-text h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-title);
    letter-spacing: 1.5px;
}

.brand-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sidebar-menu {
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-body);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition);
}

.menu-item i {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: var(--transition);
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-title);
}

.menu-item:hover i {
    color: var(--primary);
}

.menu-item.active {
    background-color: var(--primary-glow);
    color: var(--text-title);
    border-left: 4px solid var(--primary);
}

.menu-item.active i {
    color: var(--primary);
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
}

.footer-info {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.footer-info i {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Main Content Styling */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
}

.app-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-title-container h1 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-title);
}

.header-title-container p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* User Switcher */
.user-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-switcher label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.select-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--primary);
    pointer-events: none;
}

.select-wrapper select {
    background-color: var(--bg-card);
    color: var(--text-title);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 16px 10px 36px;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
    appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.select-wrapper select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Panels */
.panel-container {
    padding: 32px;
    flex-grow: 1;
}

.app-panel {
    display: none;
}

.app-panel.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.kpi-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

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

.kpi-icon-wrapper i {
    width: 24px;
    height: 24px;
}

.kpi-icon-wrapper.blue { background-color: rgba(2, 132, 199, 0.15); color: #38bdf8; }
.kpi-icon-wrapper.orange { background-color: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.kpi-icon-wrapper.yellow { background-color: rgba(253, 224, 71, 0.15); color: #fef08a; }
.kpi-icon-wrapper.red { background-color: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.kpi-icon-wrapper.green { background-color: rgba(16, 185, 129, 0.15); color: #34d399; }

.kpi-data {
    display: flex;
    flex-direction: column;
}

.kpi-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-title);
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
}

.kpi-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 24px;
    margin-bottom: 24px;
}

.dashboard-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-header {
    flex-wrap: wrap;
    gap: 16px;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-title);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h3 i {
    color: var(--primary);
    width: 20px;
    height: 20px;
}

.card-header p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-body {
    padding: 24px;
    flex-grow: 1;
}

.chart-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 280px;
}

/* Yacht Project Progress List */
.project-list-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 8px;
}

.project-item {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: var(--transition);
}

.project-item:hover {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: rgba(2, 132, 199, 0.2);
}

.project-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-name-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-name-container i {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.project-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-title);
}

.project-meta-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 24px;
}

.project-tasks-summary {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.project-percent {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
}

/* Interactive Progress Bar with Moving Yacht Icon */
.progress-bar-wrapper {
    position: relative;
    height: 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    width: 100%;
    overflow: visible; /* Need visible to let yacht scale or stand out */
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #06b6d4 100%);
    border-radius: 8px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

.progress-ship-icon {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 26px;
    height: 26px;
    background-color: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    left: 0%;
    z-index: 5;
}

.progress-ship-icon i {
    width: 12px;
    height: 12px;
}

.project-item:hover .progress-ship-icon {
    transform: translate(-50%, -50%) scale(1.15);
    border-color: #06b6d4;
    color: #06b6d4;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

/* Master Task Table Styling */
.header-actions-row {
    display: flex;
    gap: 12px;
}

.filters-bar {
    padding: 16px 24px;
    background-color: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.filter-group {
    flex-grow: 1;
    min-width: 150px;
}

.filter-group select {
    width: 100%;
    background-color: var(--bg-main);
    color: var(--text-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.filter-group select:focus {
    border-color: var(--primary);
}

.search-box {
    position: relative;
    flex-grow: 2;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    background-color: var(--bg-main);
    color: var(--text-title);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 12px 8px 36px;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.table-responsive {
    overflow-x: auto;
    padding: 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th, .data-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.data-table th {
    font-weight: 600;
    color: var(--text-title);
    background-color: rgba(255, 255, 255, 0.01);
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

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

.actions-col {
    width: 80px;
    text-align: center;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}

.badge-project {
    background-color: rgba(2, 132, 199, 0.1);
    color: #38bdf8;
    border: 1px solid rgba(2, 132, 199, 0.2);
}

.badge-priority {
    border: 1px solid transparent;
}
.badge-priority.High { background-color: rgba(239, 68, 68, 0.1); color: #fca5a5; border-color: rgba(239, 68, 68, 0.2); }
.badge-priority.Medium { background-color: rgba(245, 158, 11, 0.1); color: #fcd34d; border-color: rgba(245, 158, 11, 0.2); }
.badge-priority.Low { background-color: rgba(100, 116, 139, 0.1); color: #cbd5e1; border-color: rgba(100, 116, 139, 0.2); }

.badge-status {
    border: 1px solid transparent;
}
.badge-status.Todo { background-color: rgba(100, 116, 139, 0.15); color: #cbd5e1; }
.badge-status.In-Progress { background-color: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-status.Review { background-color: rgba(139, 92, 246, 0.15); color: #c084fc; }
.badge-status.Done { background-color: rgba(16, 185, 129, 0.15); color: #34d399; }

.badge-phase {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-body);
}

.table-cell-title {
    font-weight: 500;
    color: var(--text-title);
    margin-bottom: 2px;
}

.table-cell-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deadline-text {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Outfit', sans-serif;
}

.deadline-text i {
    width: 14px;
    height: 14px;
}

.deadline-text.overdue {
    color: var(--color-overdue);
    font-weight: 600;
}

.empty-state-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state-container i {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    color: var(--border-color);
}

.hidden {
    display: none !important;
}

/* Action Buttons */
.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.02);
    color: var(--text-body);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background-color: var(--primary-glow);
    color: var(--primary);
    border-color: var(--primary);
}

/* ================= KANBAN BOARD ================= */
.kanban-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.kanban-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    font-family: 'Outfit', sans-serif;
    box-shadow: var(--shadow-sm);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.kanban-user-info h3 {
    font-size: 1.2rem;
    color: var(--text-title);
    font-weight: 600;
}

.kanban-user-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    height: calc(100vh - 250px);
    min-height: 450px;
}

.kanban-column {
    background-color: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.column-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(15, 23, 42, 0.2);
}

.column-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-title);
    font-size: 0.9rem;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.indicator.todo { background-color: var(--color-todo); }
.indicator.in-progress { background-color: var(--color-inprogress); }
.indicator.review { background-color: var(--color-review); }
.indicator.done { background-color: var(--color-done); }

.task-count-badge {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-family: 'Outfit', sans-serif;
    color: var(--text-muted);
}

.kanban-cards-container {
    padding: 16px;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
    transition: background-color 0.2s ease;
}

.kanban-cards-container.drag-over {
    background-color: rgba(2, 132, 199, 0.05);
    outline: 2px dashed var(--primary);
    outline-offset: -8px;
}

/* Kanban Cards */
.kanban-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: grab;
    user-select: none;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-md);
}

.kanban-card.dragging {
    opacity: 0.5;
    border: 2px dashed var(--primary);
    background-color: rgba(15, 23, 42, 0.8);
}

.card-project-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: var(--primary);
}

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-title);
    line-height: 1.4;
}

.card-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.card-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 10px;
    margin-top: 4px;
}

.card-assignee {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-body);
}

.mini-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-deadline {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Outfit', sans-serif;
}

.card-deadline.overdue {
    color: var(--color-overdue);
    font-weight: 600;
}

/* Quick Card Move Buttons (for accessibility & touch devices) */
.card-quick-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.kanban-card:hover .card-quick-actions {
    opacity: 1;
}

.btn-quick-move {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: none;
    background-color: var(--border-color);
    color: var(--text-title);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-quick-move:hover {
    background-color: var(--primary);
}

.btn-quick-move i {
    width: 12px;
    height: 12px;
}

/* ================= SETTINGS & MANAGEMENT ================= */
.settings-intro {
    margin-bottom: 24px;
}

.settings-intro h2 {
    color: var(--text-title);
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-intro h2 i {
    color: var(--primary);
}

.settings-intro p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.settings-tabs-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.settings-tabs-nav {
    display: flex;
    background-color: rgba(15, 23, 42, 0.4);
    border-bottom: 1px solid var(--border-color);
}

.settings-tab-btn {
    padding: 16px 24px;
    background: none;
    border: none;
    color: var(--text-body);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.settings-tab-btn:hover {
    color: var(--text-title);
    background-color: rgba(255, 255, 255, 0.01);
}

.settings-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.02);
}

.settings-tab-content {
    display: none;
    padding: 24px;
}

.settings-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.tab-header h3 {
    color: var(--text-title);
    font-size: 1.1rem;
    font-weight: 600;
}

.tab-header p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.settings-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 992px) {
    .settings-list {
        grid-template-columns: 1fr;
    }
}

.settings-item-card {
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.settings-item-card:hover {
    background-color: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.15);
}

.settings-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-item-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.settings-item-details h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-title);
}

.settings-item-details p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

/* ================= BUTTONS ================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    outline: none;
    user-select: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 6px var(--primary-glow);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px var(--primary-glow);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
    color: var(--text-body);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-title);
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.btn-danger:hover {
    background-color: #ef4444;
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

/* ================= MODALS ================= */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(11, 19, 41, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 600px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.show .modal-content {
    transform: scale(1);
}

.modal-sm {
    width: 450px;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-title);
}

.btn-close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-close-modal:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-title);
}

.btn-close-modal i {
    width: 18px;
    height: 18px;
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: rgba(15, 23, 42, 0.2);
}

/* Forms styling in Modals */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.col-6 {
    width: calc(50% - 8px);
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-title);
}

.form-group label .required {
    color: var(--color-overdue);
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    background-color: var(--bg-input);
    color: var(--text-title);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    outline: none;
    width: 100%;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.color-picker-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-group input[type="color"] {
    width: 48px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    background: none;
    padding: 0;
}

.color-preview-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Responsive Overrides */
@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
        height: auto;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .sidebar-menu {
        flex-direction: row;
        overflow-x: auto;
        padding: 12px;
    }
    .menu-item {
        white-space: nowrap;
    }
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .kanban-board {
        grid-template-columns: 1fr;
    }
    .form-row {
        flex-direction: column;
        gap: 16px;
    }
    .col-6 {
        width: 100%;
    }
}
