@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Base Colors */
    --primary: #5c3cfc;
    --primary-hover: #4e32d8;
    --primary-light: #7a5dff;
    --accent: #fc3c9c;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Light Theme (default if toggled off) */
    --bg-main-light: #f8fafc;
    --bg-card-light: #ffffff;
    --text-primary-light: #0f172a;
    --text-secondary-light: #64748b;
    --border-light: #e2e8f0;
    --sidebar-bg-light: #ffffff;
    --sidebar-hover-light: #f1f5f9;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    
    /* Dark Theme */
    --bg-main-dark: #09090b;
    --bg-card-dark: #18181b;
    --text-primary-dark: #f8fafc;
    --text-secondary-dark: #94a3b8;
    --border-dark: #27272a;
    --sidebar-bg-dark: #121214;
    --sidebar-hover-dark: #27272a;
    --shadow-dark: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);

    /* Current Theme Variables - Default to Dark */
    --bg-main: var(--bg-main-dark);
    --bg-card: var(--bg-card-dark);
    --text-primary: var(--text-primary-dark);
    --text-secondary: var(--text-secondary-dark);
    --border: var(--border-dark);
    --sidebar-bg: var(--sidebar-bg-dark);
    --sidebar-hover: var(--sidebar-hover-dark);
    --shadow: var(--shadow-dark);

    /* Dimensions */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    --header-height: 70px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.light-theme {
    --bg-main: var(--bg-main-light);
    --bg-card: var(--bg-card-light);
    --text-primary: var(--text-primary-light);
    --text-secondary: var(--text-secondary-light);
    --border: var(--border-light);
    --sidebar-bg: var(--sidebar-bg-light);
    --sidebar-hover: var(--sidebar-hover-light);
    --shadow: var(--shadow-light);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Base Utility Classes */
.screen {
    display: none;
    min-height: 100vh;
    width: 100vw;
}
.screen.active {
    display: flex;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
}
p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: 'Outfit', sans-serif;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 15px rgba(92, 60, 252, 0.4);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(92, 60, 252, 0.6);
}
.btn-secondary {
    background: var(--sidebar-hover);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: var(--border);
}
.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}
.btn-danger:hover {
    background: var(--danger);
    color: white;
}
.btn-block {
    width: 100%;
}
.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.icon-btn:hover {
    background: var(--sidebar-hover);
    color: var(--text-primary);
}

/* Forms */
.input-group {
    margin-bottom: 20px;
}
.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
}
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.input-wrapper i {
    position: absolute;
    left: 14px;
    color: var(--text-secondary);
}
.input-wrapper input, .input-wrapper select, .input-wrapper textarea {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-main);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
}
.input-wrapper input:focus, .input-wrapper textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(92, 60, 252, 0.2);
}
.input-wrapper textarea {
    padding-left: 16px; /* Override left padding for textareas without icons */
}
.date-input-wrapper input[type="date"] {
    padding-left: 16px;
    padding-right: 44px;
    cursor: pointer;
}
.date-picker-trigger {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}
.date-picker-trigger:hover {
    background: var(--sidebar-hover);
    color: var(--primary);
}

/* Badge */
.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    height: 16px;
    min-width: 16px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 2px solid var(--bg-card);
}
.status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.status.done, .status.completed { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.status.in-progress { background: rgba(59, 130, 246, 0.1); color: var(--info); }
.status.todo, .status.pending { background: rgba(245, 158, 11, 0.1); color: var(--warning); }


/* ==== Login Screen ==== */
#login-screen {
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
    position: relative;
    overflow: hidden;
}
.login-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-main), #1e1b4b);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.login-visual h2 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    z-index: 2;
}
.login-visual p {
    color: #cbd5e1;
    font-size: 1.2rem;
    z-index: 2;
}
.glass-sphere {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(92,60,252,0.8) 0%, rgba(252,60,156,0) 70%);
    filter: blur(40px);
    z-index: 0;
    animation: float 6s ease-in-out infinite;
}
.glass-card-decor {
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    transform: rotate(15deg);
    z-index: 1;
}
@keyframes float {
    0% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
    100% { transform: translateY(0px) scale(1); }
}
.login-form-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10%;
    background: var(--bg-card);
    z-index: 2;
}
.login-form-container .logo-wrapper img {
    height: 40px;
    margin-bottom: 40px;
}
.login-form-container h3 {
    font-size: 2rem;
    margin-bottom: 8px;
}
.login-form-container .subtitle {
    margin-bottom: 30px;
}
.demo-hints {
    margin-top: -10px;
    margin-bottom: 20px;
    font-size: 13px;
    display: flex;
    gap: 10px;
    align-items: center;
}
.demo-hints .user-hint {
    background: var(--sidebar-hover);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}
.demo-hints .user-hint:hover {
    background: var(--primary);
    color: white;
}
@media (max-width: 768px) {
    .login-visual { display: none; }
    .login-form-container { width: 100%; padding: 0 5%; }
}

/* ==== Dashboard Layout ==== */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    overflow: visible;
}
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}
.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.sidebar-header .logo-full {
    height: 30px;
    transition: var(--transition);
}
.sidebar-header .logo-icon {
    height: 30px;
    display: none;
}
.sidebar.collapsed .logo-full {
    display: none;
}
.sidebar.collapsed .logo-icon {
    display: block;
    margin: 0 auto;
    cursor: pointer;
}
.sidebar.collapsed .sidebar-header {
    justify-content: center;
}
/* Toggle button — always pinned to right edge of sidebar */
.sidebar-header .toggle-btn {
    position: absolute;
    right: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 101;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}
.sidebar-header .toggle-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.sidebar.collapsed .toggle-btn {
    transform: translateY(-50%) rotate(180deg);
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
}
.menu-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    padding: 0 20px;
    margin-bottom: 15px;
    letter-spacing: 1px;
}
.menu-label.label-bottom {
    margin-top: auto;
}
.sidebar.collapsed .menu-label {
    display: none;
}
.nav-links {
    list-style: none;
}
.nav-links li {
    position: relative;
    margin: 5px 12px;
}
.nav-links li a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}
.nav-links li a:hover, .nav-links li a.active {
    background: var(--sidebar-hover);
    color: var(--primary);
}
.nav-links li a.active {
    background: rgba(92, 60, 252, 0.1);
    font-weight: 600;
}
.nav-links li a i {
    font-size: 20px;
    min-width: 40px;
    display: flex;
    justify-content: center;
}
.sidebar.collapsed .nav-links li a {
    justify-content: center;
    padding: 12px 0;
}
.sidebar.collapsed .nav-links li a .link-name {
    display: none;
}

/* Tooltip for collapsed sidebar */
.tooltip {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-left: 10px;
    z-index: 101;
}
.sidebar.collapsed .nav-links li:hover .tooltip {
    opacity: 1;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
}
.user-profile-mini {
    display: flex;
    align-items: center;
    gap: 12px;
}
.user-profile-mini .avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.user-details {
    display: flex;
    flex-direction: column;
}
.user-details .name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}
.user-details .role {
    font-size: 12px;
    color: var(--text-secondary);
}
.sidebar.collapsed .user-details {
    display: none;
}

/* Main Content Area */
.main-content {
    position: relative;
    left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    transition: var(--transition);
}
.sidebar.collapsed ~ .main-content {
    left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

.top-header {
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 90;
    backdrop-filter: blur(10px);
    background: rgba(var(--bg-card-rgb), 0.8);
}
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}
.mobile-only {
    display: none;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}
.search-bar {
    display: flex;
    align-items: center;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 15px;
    width: 250px;
}
.search-bar i {
    color: var(--text-secondary);
    margin-right: 10px;
}
.search-bar input {
    border: none;
    background: transparent;
    color: var(--text-primary);
    outline: none;
    width: 100%;
    font-size: 14px;
}

/* Notification & Profile Dropdowns */
.notification-wrapper, .profile-dropdown {
    position: relative;
}
.notification-dropdown, .profile-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    width: 300px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 1000;
}
.profile-menu {
    width: 200px;
}
.notification-dropdown.active, .profile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(15px);
}
.notification-dropdown h4 {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.notif-list {
    max-height: 300px;
    overflow-y: auto;
}
.notif-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: var(--transition);
    cursor: pointer;
}
.notif-item:hover {
    background: var(--sidebar-hover);
}
.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(92, 60, 252, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.notif-content p {
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.notif-content span {
    font-size: 11px;
    color: var(--text-secondary);
}
.profile-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.profile-trigger img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.profile-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}
.profile-header .name {
    font-weight: 600;
    color: var(--text-primary);
}
.profile-header .role {
    font-size: 12px;
    color: var(--text-secondary);
}
.profile-menu ul {
    list-style: none;
    padding: 10px 0;
}
.profile-menu ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 14px;
}
.profile-menu ul li a:hover {
    background: var(--sidebar-hover);
    color: var(--primary);
}
.profile-menu ul li.divider {
    height: 1px;
    background: var(--border);
    margin: 5px 0;
}

/* Dynamic Content Area */
.content-area {
    padding: 30px;
    animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dashboard Cards and Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}
.stat-card-info {
    display: flex;
    flex-direction: column;
    z-index: 2;
}
.stat-card-info h3 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.stat-card-info p {
    font-size: 12px;
    color: var(--text-secondary);
}
.stat-card-info h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
}
.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 2;
}
.stat-card.primary .stat-card-icon { background: rgba(92, 60, 252, 0.1); color: var(--primary); }
.stat-card.success .stat-card-icon { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.stat-card.warning .stat-card-icon { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.stat-card.info .stat-card-icon { background: rgba(59, 130, 246, 0.1); color: var(--info); }
.stat-card::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.05));
    z-index: 1;
}

/* Tables */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    overflow-x: auto;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
table {
    width: 100%;
    border-collapse: collapse;
}
table th, table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
table th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
table td {
    color: var(--text-primary);
    font-size: 14px;
}
table tbody tr:hover {
    background: var(--sidebar-hover);
}
table tbody tr:last-child td {
    border-bottom: none;
}
.action-cell {
    display: flex;
    gap: 10px;
}

/* Kanban Board for Tasks */
.kanban-board {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}
.kanban-column {
    flex: 1;
    min-width: 300px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}
.kanban-column h3 {
    font-size: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.kanban-column h3 .count {
    background: var(--sidebar-hover);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}
.task-card {
    background: var(--bg-main);
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: grab;
    transition: var(--transition);
}
.task-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.task-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}
.task-tags span {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(92, 60, 252, 0.1);
    color: var(--primary);
    font-weight: 600;
}
.task-card h4 {
    font-size: 14px;
    margin-bottom: 8px;
}
.task-card p {
    font-size: 12px;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.task-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed var(--border);
    padding-top: 10px;
}

/* About Company & Documents */
.about-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
}
.info-card h2 {
    margin-bottom: 20px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.document-list {
    list-style: none;
}
.document-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
    background: var(--bg-main);
}
.document-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.document-info i {
    font-size: 24px;
}
.bxs-file-pdf { color: #ff4d4d; }
.bxs-file-doc { color: #4dadff; }

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    display: flex;
    /* Opacity timeout in JS */
}
.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    width: 90%;
    max-width: 600px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
.modal-overlay.show .modal {
    transform: scale(1);
}
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.close-modal {
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
}
.modal-body {
    padding: 24px;
    overflow-y: auto;
}

/* Charts container */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-top: 24px;
}
.dashboard-action-card {
    cursor: pointer;
}
.dashboard-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
    gap: 24px;
    align-items: start;
}
.dashboard-chart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 24px;
    margin-bottom: 24px;
}
.dashboard-hero-panel,
.project-overview-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 24px;
    margin-bottom: 24px;
}
.dashboard-hero-copy,
.project-overview-card {
    background:
        radial-gradient(circle at top right, rgba(252, 60, 156, 0.16), transparent 36%),
        linear-gradient(135deg, rgba(92, 60, 252, 0.12), rgba(56, 189, 248, 0.08)),
        var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow);
}
.dashboard-hero-copy h2,
.project-overview-card h2 {
    font-size: 28px;
    margin: 8px 0 12px;
    line-height: 1.25;
}
.dashboard-spotlight-grid {
    display: grid;
    gap: 16px;
}
.spotlight-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.spotlight-card span,
.spotlight-card small {
    color: var(--text-secondary);
}
.spotlight-card strong {
    font-size: 28px;
    color: var(--text-primary);
}
.analytics-chart-wrap {
    height: 360px;
}
.analytics-chart-wrap.compact {
    height: 360px;
}
.mini-progress {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    overflow: hidden;
    margin-bottom: 8px;
}
.mini-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}
.project-description-snippet {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 8px;
    line-height: 1.5;
}
.project-summary-grid {
    margin-bottom: 24px;
}
.credential-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.project-deadline-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.deadline-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-main);
}
.deadline-item p {
    font-size: 12px;
}
.deadline-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 13px;
}
.portfolio-health {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.portfolio-health.strong {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}
.portfolio-health.steady {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}
.portfolio-health.needs-support {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}
.portfolio-health-item {
    border-left: 4px solid rgba(92, 60, 252, 0.3);
}

.progress-wave-shell {
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
}

.about-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.company-hero-card {
    position: relative;
    overflow: hidden;
}
.company-kicker {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 11px;
    color: var(--accent);
    margin-bottom: 12px;
    font-weight: 700;
}
.company-tagline {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 14px;
}
.company-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.company-meta-grid div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--bg-main);
    border: 1px solid var(--border);
}
.company-meta-grid strong {
    font-size: 12px;
}
.company-meta-grid span {
    font-size: 13px;
    color: var(--text-secondary);
}
.company-detail-list {
    padding-left: 18px;
    color: var(--text-secondary);
    line-height: 1.8;
}
.leadership-list {
    display: grid;
    gap: 12px;
}
.leader-card {
    padding: 16px;
    border-radius: 12px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.leader-card span {
    color: var(--text-secondary);
    font-size: 13px;
}
.ticket-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.ticket-status-select {
    width: 100%;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-main);
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar { left: calc(-1 * var(--sidebar-width)); }
    .sidebar.mobile-active { left: 0; width: var(--sidebar-width); }
    .main-content { left: 0; width: 100%; }
    .sidebar.collapsed ~ .main-content { left: 0; width: 100%; }
    .mobile-only { display: block; }
    .sidebar-header .toggle-btn { display: none; }
    .search-bar { display: none; }
    .about-sections { grid-template-columns: 1fr; }
    .dashboard-detail-grid { grid-template-columns: 1fr; }
    .dashboard-chart-grid { grid-template-columns: 1fr; }
    .dashboard-hero-panel, .project-overview-shell { grid-template-columns: 1fr; }
    .ticket-form-grid { grid-template-columns: 1fr; }
    
    /* Removed Mobile Blocker to allow responsive display
    body > *:not(.mobile-blocker) {
        display: none !important;
    }
    .mobile-blocker {
        display: flex !important;
    }
    */
}

.mobile-blocker {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: var(--bg-main);
    z-index: 9999999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 30px;
    text-align: center;
}

/* Milestone Review System */
.milestone-card {
    transition: var(--transition);
}
.milestone-card:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: var(--primary) !important;
}
.milestone-input-row {
    animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
