/* ===========================
   QUẢN LÝ ĐỒ ÁN
   Soft UI / Premium Base Theme
   No Icons - Typography Only
   =========================== */

/* === GOOGLE FONT: INTER === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* === CSS VARIABLES === */
:root {
    --bg: #F4F7FE;
    --bg-subtle: #F8F9FA;
    --surface: #FFFFFF;
    --border: #E8ECF2;
    --border-light: #F4F7FE;

    --text-primary: #1B254B;
    --text-secondary: #68769F;
    --text-tertiary: #8F9BB7;
    --text-inverse: #FFFFFF;

    --accent: #4318FF;
    --accent-hover: #3311DB;
    --accent-light: #E9E3FF;
    --accent-text: #4318FF;

    --success: #01B574;
    --success-light: #E6F8F1;
    --success-text: #018555;

    --warning: #FFCE20;
    --warning-light: #FFF9E5;
    --warning-text: #C7A11A;

    --danger: #EE5D50;
    --danger-light: #FDEEEB;
    --danger-text: #D53F33;

    --info: #00B5E2;
    --info-light: #E5F7FC;
    --info-text: #008AA8;

    --purple: #7C3AED;
    --purple-light: #F5F3FF;
    --purple-text: #6D28D9;

    --shadow-xs: 0 4px 10px rgba(112, 144, 176, 0.04);
    --shadow-sm: 0 8px 16px rgba(112, 144, 176, 0.06);
    --shadow-md: 0 12px 24px rgba(112, 144, 176, 0.08);
    --shadow-lg: 0 16px 32px rgba(112, 144, 176, 0.1);
    --shadow-xl: 0 20px 40px rgba(112, 144, 176, 0.12);
    --shadow-card: 0 18px 40px rgba(112, 144, 176, 0.12);

    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    --sidebar-width: 280px;
    --navbar-height: 90px;
}

/* === RESET === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg);
    min-height: 100vh;
}

h1 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.8px;
    color: var(--text-primary);
}

h2 {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

h3 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
}

h4 {
    font-size: 16px;
    font-weight: 600;
}

h5 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

p {
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 32px;
}

/* === NAVBAR === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: rgba(244, 247, 254, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(112, 144, 176, 0.15);
    z-index: 100;
}

.navbar .container {
    max-width: 100% !important;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    margin-right: 16px;
    text-decoration: none;
}

.navbar-logo {
    height: 150px;
    width: auto;
    object-fit: contain;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* User dropdown */
.user-dropdown {
    position: relative;
    cursor: pointer;
}

.user-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: var(--radius-md);
    transition: background 0.15s;
    text-decoration: none;
}

.user-dropdown-trigger:hover {
    background: var(--bg);
}

.user-dropdown-trigger .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-dropdown-trigger .user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown-trigger .user-role {
    font-size: 11px;
    color: var(--text-tertiary);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown-trigger::after {
    content: '▼';
    font-size: 9px;
    color: var(--text-tertiary);
    margin-left: 2px;
    transition: transform 0.2s;
}

.user-dropdown.open>.user-dropdown-trigger::after {
    transform: rotate(180deg);
}

/* Navbar Back Button */
.navbar-back-btn {
    margin-right: 8px;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: 8px;
    display: none;
    z-index: 200;
}

.user-dropdown.open>.user-dropdown-menu {
    display: block;
}

.user-dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background 0.15s;
}

.user-dropdown-item:hover {
    background: var(--bg);
}

.user-dropdown-item.danger {
    color: var(--danger);
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 8px 0;
}

.navbar-search {
    position: relative;
}

.navbar-search input {
    width: 320px;
    height: 48px;
    padding: 0 24px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--surface);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.navbar-search input:focus {
    outline: none;
    box-shadow: var(--shadow-md), 0 0 0 3px var(--accent-light);
}

.navbar-search input::placeholder {
    color: var(--text-secondary);
    font-weight: 400;
}

.notif-btn {
    height: 48px;
    padding: 0 24px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--surface);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.notif-btn:hover {
    color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 6px 20px 6px 6px;
    border-radius: var(--radius-full);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-info:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.user-role {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.2;
}

.logout-btn {
    height: 48px;
    padding: 0 24px;
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    color: var(--danger);
    background: var(--danger-light);
}

/* === PAGE LAYOUT === */
.page-layout {
    display: flex;
    padding-top: var(--navbar-height);
    min-height: 100vh;
}

/* === SIDEBAR === */
.sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg);
    padding: 32px 24px;
    overflow-y: auto;
    z-index: 90;
    border-right: 1px solid rgba(112, 144, 176, 0.12);
}

.sidebar-section {
    margin-bottom: 32px;
}

.sidebar-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    padding: 0 16px;
    margin-bottom: 12px;
}

.sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav li a {
    display: block;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    text-decoration: none;
}

.sidebar-nav li a:hover {
    background: var(--surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.sidebar-nav li a.active {
    background: var(--surface);
    color: var(--accent);
    box-shadow: var(--shadow-md);
}

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 24px 16px;
}

.sidebar-delete-btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    color: var(--danger);
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: all 0.2s ease;
}

.sidebar-delete-btn:hover {
    background: var(--danger-light);
    color: var(--danger-text);
}

/* === MAIN CONTENT === */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 24px 40px;
    max-width: calc(100% - var(--sidebar-width));
}

.main-full {
    margin-left: 0;
    max-width: 100%;
    padding: 40px;
}

/* === CARDS === */
.card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    border: none;
    overflow: hidden;
    padding: 32px;
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

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

.card-header h3 {
    font-size: 18px;
    font-weight: 700;
}

/* === STAT CARDS === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 20px 24px;
    box-shadow: var(--shadow-card);
    border: none;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 40px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.stat-value.accent {
    color: var(--accent);
}

.stat-value.success {
    color: var(--success);
}

.stat-value.warning {
    color: var(--warning);
}

.stat-value.danger {
    color: var(--danger);
}

.stat-sub {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* === BADGES / PILLS === */
.badge {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-pending {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

.badge-in_progress {
    background: var(--info-light);
    color: var(--info-text);
}

.badge-review {
    background: var(--purple-light);
    color: var(--purple-text);
}

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

.badge-low {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

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

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

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

.badge-owner {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 700;
}

.badge-manager {
    background: var(--success-light);
    color: var(--success-text);
    font-weight: 700;
}

.badge-member {
    background: var(--info-light);
    color: var(--info-text);
    font-weight: 600;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 24px;
    border: none;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 8px 16px rgba(67, 24, 255, 0.2);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 12px 24px rgba(67, 24, 255, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-subtle);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: 0 8px 16px rgba(5, 205, 153, 0.2);
}

.btn-success:hover {
    background: #04A67A;
}

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

.btn-danger:hover {
    background: #D53F33;
}

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

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.btn-sm {
    height: 36px;
    padding: 0 20px;
    font-size: 14px;
}

.btn-lg {
    height: 56px;
    padding: 0 32px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-auto {
    width: auto;
    justify-content: center;
}

/* === FORMS === */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.form-control {
    width: 100%;
    height: 52px;
    padding: 0 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    background: #F8F9FA;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 0 0 4px rgba(67, 24, 255, 0.15);
}

.form-control::placeholder {
    color: var(--text-tertiary);
    font-weight: 400;
}

textarea.form-control {
    height: auto;
    min-height: 120px;
    padding: 16px 20px;
    resize: vertical;
    line-height: 1.6;
}

/* === TABS === */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tab-btn {
    padding: 12px 24px;
    background: var(--surface);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: inherit;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.tab-btn:hover {
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.tab-btn.active {
    background: var(--text-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* === MODAL === */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 20, 55, 0.4);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-2xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: none;
    padding: 8px;
}

.modal-lg {
    max-width: 800px;
}

.modal-header {
    padding: 32px 32px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 800;
}

.modal-close {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--bg-subtle);
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--border);
    color: var(--text-primary);
}

.modal-body {
    padding: 0 32px 32px;
}

.modal-footer {
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

/* === ALERTS === */
.alert {
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 24px;
}

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

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

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

.alert-info {
    background: var(--info-light);
    color: var(--info-text);
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 80px 32px;
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* === PROGRESS BAR === */
.progress-bar {
    height: 12px;
    background: #F4F7FE;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--accent);
    transition: width 0.3s ease;
}

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

.project-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-card);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    text-decoration: none;
}

.project-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.project-card .project-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.project-card .project-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-progress {
    margin-bottom: 20px;
}

.project-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 8px;
}

.project-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* === SECTION HEADER === */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 20px;
}

.section-header h1 {
    font-size: 36px;
    letter-spacing: -1px;
}

.section-header h2 {
    font-size: 28px;
    letter-spacing: -0.5px;
}

.section-header p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-top: 8px;
    font-weight: 500;
}

/* === OTHER OVERRIDES === */
.table-wrapper {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    padding: 32px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

thead th {
    padding: 14px 24px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border);
    background: var(--bg-subtle);
}

tbody td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 500;
}

tbody tr:hover td {
    background: var(--bg-subtle);
}

.flex {
    display: flex;
}

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

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

.justify-center {
    justify-content: center;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}


/* === AUTH PAGES === */
.auth-page,
.welcome-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #F4F7FE 0%, #E9E3FF 50%, #F4F7FE 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
}

.lang-toggle-top {
    position: absolute;
    top: 20px;
    right: 24px;
}

.auth-card,
.welcome-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 52px 44px;
    max-width: 460px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(67, 24, 255, 0.08), 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.auth-brand {
    text-align: center;
    margin-bottom: 36px;
}

.auth-brand-logo {
    width: 80px;
    height: auto;
    object-fit: contain;
    margin: 0 auto 16px;
    display: block;
}

.auth-brand h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.auth-brand p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.auth-card h2 {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 28px;
    letter-spacing: -0.3px;
}

.welcome-hero {
    text-align: center;
    margin-bottom: 36px;
}

.welcome-hero h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.8px;
}

.welcome-hero p {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

.welcome-features {
    background: var(--bg);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 32px;
}

.welcome-features p {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.welcome-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.welcome-features ul li {
    font-size: 13.5px;
    color: var(--text-primary);
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.welcome-features ul li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
    font-size: 13px;
}

.demo-info {
    background: var(--accent-light);
    border: 1px solid rgba(67, 24, 255, 0.12);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 12.5px;
    color: var(--accent-text);
    margin-top: 20px;
    line-height: 1.8;
}

.demo-info strong {
    font-weight: 700;
}

.demo-info code {
    background: rgba(67, 24, 255, 0.08);
    padding: 2px 8px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 600;
}

/* === UTILITIES === */
.mb-1 {
    margin-bottom: 8px;
}

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

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

.mt-1 {
    margin-top: 8px;
}

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

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

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

.font-semibold {
    font-weight: 600;
}

/* === AUTH RESPONSIVE === */
@media (max-width: 600px) {

    .auth-page,
    .welcome-page {
        padding: 16px;
        align-items: flex-start;
        padding-top: 40px;
    }

    .auth-card,
    .welcome-card {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .auth-brand-logo {
        width: 60px;
    }

    .auth-brand h1 {
        font-size: 20px;
    }

    .welcome-hero h1 {
        font-size: 22px;
    }

    .welcome-features {
        padding: 16px 18px;
    }

    .lang-toggle-top {
        top: 12px;
        right: 12px;
    }

    .demo-info {
        font-size: 12px;
        padding: 12px 14px;
    }
}

@media (max-width: 400px) {

    .auth-card,
    .welcome-card {
        padding: 24px 18px;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: block;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
        top: 0;
        height: 100vh;
        padding-top: var(--navbar-height);
    }

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

    .main-content {
        margin-left: 0;
        max-width: 100%;
        padding: 24px;
    }

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

    .overview-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* === PROJECT DETAILS UNIQUE COMPONENTS === */

.overview-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 800;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px 0 8px 16px;
    letter-spacing: 1px;
}

@media (max-width: 1024px) {
    .mobile-menu-btn {
        display: block;
    }
}

.invite-box {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 16px 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.invite-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.invite-code {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--accent);
}

.copy-btn {
    height: 36px;
    padding: 0 16px;
    background: var(--accent-light);
    border: none;
    border-radius: var(--radius-full);
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.filter-bar .search-input {
    flex: 1;
    min-width: 240px;
    height: 48px;
    padding: 0 24px;
    border: none;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 500;
    background: var(--surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.filter-bar .search-input:focus {
    outline: none;
    box-shadow: var(--shadow-md), 0 0 0 3px var(--accent-light);
}

.filter-bar .search-input::placeholder {
    color: var(--text-tertiary);
    font-weight: 400;
}

.filter-select {
    height: 48px;
    padding: 0 24px;
    border: none;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    background: var(--surface);
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
}

.filter-select:focus {
    outline: none;
    color: var(--accent);
    box-shadow: var(--shadow-md);
}

.status-select {
    height: 36px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    background: var(--bg-subtle);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
}

.status-select:focus {
    outline: none;
    border-color: var(--accent);
}

.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.activity-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    margin-top: 6px;
    flex-shrink: 0;
    box-shadow: 0 0 0 4px var(--accent-light);
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.6;
}

.activity-text strong {
    font-weight: 700;
    color: var(--text-primary);
}

.activity-time {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* ===== RESPONSIVE NAVBAR ===== */
@media (max-width: 900px) {

    .user-dropdown-trigger .user-name,
    .user-dropdown-trigger .user-role {
        display: none;
    }
}

@media (max-width: 768px) {

    /* --- Navbar Declutter --- */
    .navbar .container {
        padding: 0 12px;
        gap: 8px;
    }

    .navbar-brand {
        display: flex;
        padding: 0;
        margin: 0;
    }

    .navbar-logo {
        display: none;
    }

    .navbar-back-btn {
        font-size: 13px;
        height: 32px;
        padding: 0 14px;
    }

    .user-dropdown-trigger {
        padding: 4px;
    }

    .user-dropdown-trigger .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .user-dropdown-trigger .user-name,
    .user-dropdown-trigger .user-role {
        display: none;
    }

    .mobile-menu-btn {
        font-size: 12px;
        padding: 6px 0 6px 10px;
    }

    /* --- Mobile Layout --- */
    .page-layout {
        padding: var(--navbar-height) 16px 0 16px;
        gap: 12px;
    }

    .main-content {
        padding: 12px 0;
    }

    /* --- Section Header (stack vertically) --- */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .section-header h1 {
        font-size: 24px;
    }

    .section-header h2 {
        font-size: 20px;
        word-break: break-word;
    }

    /* Action buttons full-width on mobile */
    .section-header .flex.gap-2,
    .section-header>div:last-child {
        display: flex;
        width: 100%;
        gap: 10px;
    }

    .section-header .flex.gap-2 .btn,
    .section-header>div:last-child .btn {
        flex: 1;
        justify-content: center;
        padding: 0 4px;
        white-space: nowrap;
    }

    /* --- Stats: Horizontal swipe with PEEK indicator --- */
    .stats-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding-bottom: 8px;
        margin-right: -16px;
        /* bleed past edge = peek effect */
        padding-right: 16px;
        scrollbar-width: none;
    }

    .stats-grid::-webkit-scrollbar {
        display: none;
    }

    .stats-grid>* {
        min-width: 130px;
        flex-shrink: 0;
    }

    /* --- Overview grid: 2-col on mobile --- */
    .overview-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* --- Project cards: single column --- */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    /* --- Tabs: horizontal scroll with peek --- */
    .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        margin-right: -16px;
        padding-right: 16px;
        scrollbar-width: none;
    }

    .tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* --- Tables: horizontal scroll wrapper --- */
    .table-wrapper {
        padding: 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-wrapper table {
        min-width: 600px;
        /* force scroll on small screens */
    }

    /* --- Forms: full-width inputs & buttons --- */
    .form-control {
        width: 100%;
        box-sizing: border-box;
    }

    .card .btn-primary,
    .card .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    /* --- Settings: stack cards vertically --- */
    .projects-grid[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* --- Invite Box compact --- */
    .invite-box {
        padding: 12px 16px;
    }

    .invite-code {
        font-size: 15px;
        letter-spacing: 2px;
    }

    /* --- Filter bar: wrap nicely --- */
    .filter-bar {
        gap: 8px;
    }

    .filter-bar .search-input {
        min-width: auto;
        width: 100%;
    }

    .filter-select {
        width: 100%;
    }

    /* --- Cards tighter padding --- */
    .card {
        padding: 20px;
    }

    .stat-card {
        padding: 16px;
    }
}

/* ===== SIDEBAR OVERLAY (Dark Backdrop) ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(11, 20, 55, 0.45);
    z-index: 89;
    /* just below sidebar z-index 90 */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ===== RESPONSIVE SIDEBAR (compact items) ===== */
@media (max-width: 1024px) {
    .sidebar {
        z-index: 91;
        /* above overlay */
    }

    .sidebar-section {
        margin-bottom: 16px;
    }

    .sidebar-nav li a {
        padding: 10px 16px;
        font-size: 14px;
    }

    .sidebar-divider {
        margin: 12px 16px;
    }
}

/* ===== PAGE LOADING OVERLAY ===== */
#page-loader {
    position: fixed;
    inset: 0;
    background: rgba(244, 247, 254, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

#page-loader.show {
    opacity: 1;
    pointer-events: all;
}

.loader-text {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: loader-pulse 1.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes loader-pulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@media (max-width: 480px) {
    .navbar {
        height: 56px;
    }

    .page-layout {
        padding-top: 56px;
    }
}