/**
 * PMSS - Project Management System
 * Main Stylesheet
 * Color Scheme: Midnight Blue (#1e3a5f) + White
 */

/* =====================================================
   CSS VARIABLES
===================================================== */
:root {
    /* Primary Colors */
    --primary: #1e3a5f;
    --primary-dark: #152a45;
    --primary-light: #2c5282;
    --primary-lighter: #3d6a9f;

    /* Secondary Colors */
    --secondary: #4a5568;
    --secondary-light: #718096;

    /* Accent Colors */
    --accent: #3182ce;
    --accent-light: #63b3ed;

    /* Background Colors */
    --bg-body: #f7fafc;
    --bg-white: #ffffff;
    --bg-light: #edf2f7;
    --bg-sidebar: #1e3a5f;
    --bg-sidebar-hover: #2c5282;
    --bg-sidebar-active: #152a45;

    /* Text Colors */
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-light: #a0aec0;
    --text-white: #ffffff;

    /* Border Colors */
    --border-color: #e2e8f0;
    --border-light: #edf2f7;

    /* Status Colors */
    --success: #38a169;
    --warning: #d69e2e;
    --danger: #e53e3e;
    --info: #3182ce;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Transitions */
    --transition: all 0.2s ease-in-out;

    /* Sizing */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --navbar-height: 60px;
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
}

/* =====================================================
   BASE STYLES
===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* =====================================================
   SPLASH SCREEN
===================================================== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.splash-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}

.splash-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.splash-title {
    color: var(--text-white);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.splash-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 40px;
}

.splash-loader {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.splash-loader-bar {
    width: 0%;
    height: 100%;
    background: var(--text-white);
    border-radius: 4px;
    animation: loading 2s ease-in-out forwards;
}

@keyframes loading {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

/* =====================================================
   LOGIN PAGE
===================================================== */
.login-container {
    min-height: 100vh;
    display: flex;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

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

.login-left .logo {
    width: 100px;
    height: 100px;
    margin-bottom: 30px;
}

.login-left .logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-left h1 {
    color: var(--text-white);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.login-left p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--bg-white);
}

.login-box {
    width: 100%;
    max-width: 420px;
    padding: 40px;
}

.login-box h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.login-box p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.login-box .form-control {
    height: 48px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0 16px;
    font-size: 14px;
    transition: var(--transition);
}

.login-box .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.login-box .input-group-text {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-right: none;
    color: var(--text-muted);
}

.login-box .btn-primary {
    height: 48px;
    font-size: 15px;
    font-weight: 600;
    background: var(--primary);
    border: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.login-box .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    color: var(--text-muted);
    font-size: 13px;
}

@media (max-width: 992px) {
    .login-left {
        display: none;
    }
    .login-right {
        flex: 1;
    }
}

/* =====================================================
   LAYOUT - SIDEBAR
===================================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    flex-shrink: 0;
}

.sidebar-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    color: var(--text-white);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.brand-tagline {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    font-weight: 400;
}

.sidebar-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--border-radius);
    color: var(--text-white);
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Sidebar User Profile */
.sidebar-user {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 12px;
}

.sidebar-user .user-avatar {
    position: relative;
    flex-shrink: 0;
}

.sidebar-user .user-avatar .avatar-initials,
.sidebar-user .user-avatar img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

.sidebar-user .user-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--bg-sidebar);
}

.sidebar-user .user-status.online {
    background: var(--success);
}

.sidebar-user .user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-user .user-name {
    color: var(--text-white);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .user-role {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.sidebar-brand {
    color: var(--text-white);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    padding: 15px 0;
    flex: 1;
    overflow-y: auto;
}

.nav-section {
    padding: 10px 20px 8px;
    margin-top: 8px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin: 2px 0;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
    text-decoration: none;
}

.sidebar-nav .nav-link .nav-icon {
    width: 22px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-nav .nav-link .nav-icon i {
    font-size: 16px;
}

.sidebar-nav .nav-link .nav-text {
    flex: 1;
}

.sidebar-nav .nav-link:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-white);
}

.sidebar-nav .nav-link.active {
    background: var(--bg-sidebar-active);
    color: var(--text-white);
    border-left-color: var(--accent);
}

.sidebar-nav .nav-link .nav-badge {
    margin-left: auto;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 12px;
    background: var(--accent);
    color: var(--text-white);
    font-weight: 600;
}

.sidebar-nav .nav-link .nav-badge.danger {
    background: var(--danger);
}

.sidebar-nav .nav-link .nav-badge.warning {
    background: var(--warning);
}

.sidebar-nav .nav-link .badge {
    margin-left: auto;
    font-size: 10px;
    padding: 4px 8px;
}

/* Sidebar Collapsed */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .nav-section,
.sidebar.collapsed .nav-link .nav-text,
.sidebar.collapsed .nav-link .nav-badge,
.sidebar.collapsed .sidebar-user .user-info,
.sidebar.collapsed .sidebar-footer,
.sidebar.collapsed .sidebar-close {
    display: none;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 20px 15px;
}

.sidebar.collapsed .sidebar-brand-link {
    justify-content: center;
}

.sidebar.collapsed .sidebar-logo {
    margin-right: 0;
}

.sidebar.collapsed .sidebar-user {
    justify-content: center;
    padding: 16px;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 14px;
}

.sidebar.collapsed .nav-link .nav-icon {
    margin-right: 0;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.sidebar-footer-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-help .help-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    text-decoration: none;
    transition: var(--transition);
}

.footer-help .help-link:hover {
    color: var(--text-white);
}

.footer-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.footer-info .version {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

/* =====================================================
   LAYOUT - MAIN CONTENT
===================================================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

/* Top Navbar */
.top-navbar {
    height: var(--navbar-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

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

.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.navbar-breadcrumb .breadcrumb {
    margin: 0;
    background: transparent;
    padding: 0;
}

.navbar-breadcrumb .breadcrumb-item {
    font-size: 13px;
}

.navbar-breadcrumb .breadcrumb-item a {
    color: var(--text-muted);
}

.navbar-breadcrumb .breadcrumb-item a:hover {
    color: var(--primary);
}

.navbar-breadcrumb .breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

.navbar-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-light);
}

/* Global Search */
.navbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 500px;
    margin: 0 24px;
}

.global-search {
    width: 100%;
}

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

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 14px;
}

.search-input {
    width: 100%;
    height: 40px;
    padding: 0 100px 0 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    background: var(--bg-light);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-shortcut {
    position: absolute;
    right: 12px;
    display: flex;
    gap: 4px;
}

.search-shortcut kbd {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
    font-family: inherit;
    color: var(--text-muted);
}

/* Navbar Right */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-date {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    font-size: 13px;
    color: var(--text-secondary);
    margin-right: 8px;
}

.navbar-date i {
    color: var(--primary);
}

.navbar-action-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
}

.navbar-action-btn:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--danger);
    color: var(--text-white);
    font-size: 10px;
    font-weight: 600;
    border-radius: 9px;
    padding: 0 4px;
}

.notification-badge.pulse {
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Quick Actions Menu */
.quick-actions-menu {
    width: 280px;
    padding: 0;
}

.quick-actions-menu .dropdown-header {
    padding: 14px 16px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: none;
    letter-spacing: 0;
}

.quick-actions-menu .dropdown-body {
    padding: 8px;
}

.quick-action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
}

.quick-action-item:hover {
    background: var(--bg-light);
}

.quick-action-item .action-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    font-size: 16px;
    flex-shrink: 0;
}

.quick-action-item .action-text {
    display: flex;
    flex-direction: column;
}

.quick-action-item .action-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.quick-action-item .action-desc {
    font-size: 11px;
    color: var(--text-muted);
}

/* Notifications Dropdown */
.notifications-dropdown {
    width: 360px;
    padding: 0;
    max-height: 480px;
    overflow: hidden;
}

.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
}

.notifications-header h6 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.notifications-header .unread-count {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
}

.notifications-body {
    max-height: 340px;
    overflow-y: auto;
}

.notifications-empty {
    padding: 40px 20px;
    text-align: center;
}

.notifications-empty .empty-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 50%;
    margin: 0 auto 16px;
    font-size: 24px;
    color: var(--text-muted);
}

.notifications-empty p {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.notifications-empty span {
    font-size: 12px;
    color: var(--text-muted);
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
    position: relative;
}

.notification-item:hover {
    background: var(--bg-light);
}

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

.notification-item.unread {
    background: rgba(30, 58, 95, 0.03);
}

.notification-item .notification-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    font-size: 14px;
}

.notification-item .notification-content {
    flex: 1;
    min-width: 0;
}

.notification-item .notification-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 2px 0;
}

.notification-item .notification-text {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-item .notification-time {
    font-size: 11px;
    color: var(--text-light);
}

.notification-item .unread-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.notifications-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.notifications-footer .view-all-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
}

.notifications-footer .view-all-link:hover {
    text-decoration: underline;
}

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

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.user-menu-btn:hover {
    background: var(--bg-light);
}

.user-avatar-wrapper {
    position: relative;
}

.user-avatar-wrapper .avatar-initials,
.user-avatar-wrapper img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.user-avatar-wrapper .status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--bg-white);
}

.user-avatar-wrapper .status-indicator.online {
    background: var(--success);
}

.user-menu-btn .user-info {
    text-align: left;
}

.user-menu-btn .user-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-menu-btn .user-role {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}

.user-menu-btn .dropdown-arrow {
    font-size: 10px;
    color: var(--text-muted);
    transition: var(--transition);
}

.user-dropdown.show .dropdown-arrow {
    transform: rotate(180deg);
}

/* User Dropdown Menu */
.user-dropdown-menu {
    width: 280px;
    padding: 0;
}

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
}

.user-dropdown-avatar .avatar-initials,
.user-dropdown-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.user-dropdown-info h6 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 2px 0;
}

.user-dropdown-info p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 6px 0;
}

.user-dropdown-info .role-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary);
    color: var(--text-white);
    font-size: 10px;
    font-weight: 500;
    border-radius: 10px;
    text-transform: uppercase;
}

.user-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 13px;
}

.user-dropdown-menu .dropdown-item i {
    width: 18px;
    color: var(--text-muted);
}

.user-dropdown-menu .dropdown-item span {
    flex: 1;
}

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

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

.user-dropdown-menu .logout-item:hover {
    background: rgba(229, 62, 62, 0.1);
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.navbar-search {
    position: relative;
}

.navbar-search input {
    width: 240px;
    height: 38px;
    padding: 0 16px 0 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 13px;
    transition: var(--transition);
}

.navbar-search input:focus {
    width: 300px;
    border-color: var(--primary);
    outline: none;
}

.navbar-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.navbar-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.navbar-icon:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.navbar-icon .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    padding: 0;
}

.navbar-user {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.navbar-user:hover {
    background: var(--bg-light);
}

.navbar-user .avatar-initials {
    width: 36px;
    height: 36px;
    font-size: 13px;
}

.navbar-user-info {
    margin-left: 10px;
    text-align: left;
}

.navbar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.navbar-user-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* =====================================================
   PAGE CONTENT
===================================================== */
.page-content {
    padding: 24px;
}

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

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span {
    color: var(--text-primary);
}

/* =====================================================
   CARDS
===================================================== */
.card {
    background: var(--bg-white);
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

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

.card-header h5, .card-header h6 {
    margin: 0;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.card-footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border-light);
    padding: 12px 20px;
}

/* Stat Cards */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card .stat-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(30, 58, 95, 0.1);
    color: var(--primary);
    font-size: 24px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-change {
    font-size: 12px;
    margin-top: 8px;
}

.stat-card .stat-change.positive {
    color: var(--success);
}

.stat-card .stat-change.negative {
    color: var(--danger);
}

.stat-card.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.stat-card.primary .stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-white);
}

.stat-card.primary .stat-value,
.stat-card.primary .stat-label {
    color: var(--text-white);
}

/* =====================================================
   TABLES
===================================================== */
.table-container {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.table-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-search {
    position: relative;
}

.table-search input {
    width: 220px;
    height: 36px;
    padding: 0 12px 0 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 13px;
}

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

.table-filters {
    display: flex;
    gap: 10px;
}

.table-filters select {
    height: 36px;
    padding: 0 30px 0 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 13px;
    background-position: right 10px center;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--bg-light);
    border-bottom: 2px solid var(--border-color);
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

.table tbody tr:hover {
    background: var(--bg-light);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table .actions {
    white-space: nowrap;
}

.table .action-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.table .action-btn:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.table .action-btn.edit:hover {
    color: var(--info);
}

.table .action-btn.delete:hover {
    color: var(--danger);
}

.table-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-light);
}

.table-info {
    font-size: 13px;
    color: var(--text-muted);
}

/* =====================================================
   BUTTONS
===================================================== */
.btn {
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--text-white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary);
    border-color: var(--secondary);
    color: var(--text-white);
}

.btn-secondary:hover, .btn-secondary:focus {
    background: var(--secondary-light);
    border-color: var(--secondary-light);
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: var(--text-white);
}

.btn-light {
    background: var(--bg-light);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-light:hover {
    background: var(--border-color);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
}

.btn-icon.btn-sm {
    width: 32px;
    height: 32px;
}

/* =====================================================
   FORMS
===================================================== */
.form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-control, .form-select {
    height: 42px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0 14px;
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.form-control::placeholder {
    color: var(--text-light);
}

textarea.form-control {
    height: auto;
    padding: 12px 14px;
    min-height: 100px;
}

.form-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.input-group-text {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 14px;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-switch .form-check-input:checked {
    background-color: var(--primary);
}

.required::after {
    content: '*';
    color: var(--danger);
    margin-left: 3px;
}

/* =====================================================
   BADGES
===================================================== */
.badge {
    font-size: 11px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 20px;
}

.badge.bg-primary {
    background: var(--primary) !important;
}

.badge.bg-success {
    background: var(--success) !important;
}

.badge.bg-warning {
    background: var(--warning) !important;
}

.badge.bg-danger {
    background: var(--danger) !important;
}

.badge.bg-info {
    background: var(--info) !important;
}

.badge.bg-secondary {
    background: var(--secondary) !important;
}

/* =====================================================
   PROGRESS BARS
===================================================== */
.progress {
    height: 8px;
    border-radius: 4px;
    background: var(--bg-light);
    overflow: hidden;
}

.progress-bar {
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* =====================================================
   MODALS
===================================================== */
.modal-content {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
    padding: 16px 20px;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--border-light);
    padding: 16px 20px;
}

/* Confirmation Modal */
#confirmModal .confirm-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

#confirmModal .modal-header.border-danger {
    border-bottom: 3px solid var(--danger);
}

#confirmModal .modal-header.border-warning {
    border-bottom: 3px solid var(--warning);
}

#confirmModal .modal-header.border-info {
    border-bottom: 3px solid var(--info);
}

#confirmModal .modal-body {
    font-size: 15px;
    color: var(--text-secondary);
}

#confirmModal .modal-footer .btn {
    min-width: 100px;
}

#confirmModal.show .confirm-icon i {
    animation: confirmIconPulse 0.4s ease-out;
}

@keyframes confirmIconPulse {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

/* =====================================================
   ALERTS
===================================================== */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 14px 18px;
    font-size: 14px;
}

.alert-success {
    background: rgba(56, 161, 105, 0.1);
    color: var(--success);
}

.alert-danger {
    background: rgba(229, 62, 62, 0.1);
    color: var(--danger);
}

.alert-warning {
    background: rgba(214, 158, 46, 0.1);
    color: var(--warning);
}

.alert-info {
    background: rgba(49, 130, 206, 0.1);
    color: var(--info);
}

/* =====================================================
   DROPDOWNS
===================================================== */
.dropdown-menu {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    min-width: 200px;
}

.dropdown-item {
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-primary);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.dropdown-item i {
    width: 20px;
    margin-right: 8px;
    color: var(--text-muted);
}

.dropdown-divider {
    margin: 6px 0;
    border-color: var(--border-light);
}

.dropdown-header {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 8px 14px;
}

/* =====================================================
   NOTIFICATIONS DROPDOWN
===================================================== */
.notifications-dropdown {
    width: 360px;
    max-height: 400px;
    overflow: hidden;
}

.notification-item {
    display: flex;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.notification-item:hover {
    background: var(--bg-light);
}

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

.notification-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--primary);
    margin-right: 12px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.notification-text {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-time {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

.notification-item.unread {
    background: rgba(30, 58, 95, 0.03);
}

.notification-item.unread .notification-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    margin-right: 6px;
}

/* =====================================================
   AVATAR
===================================================== */
.avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--text-white);
    font-weight: 600;
    border-radius: 50%;
}

.avatar-group {
    display: flex;
}

.avatar-group .avatar-initials {
    margin-left: -8px;
    border: 2px solid var(--bg-white);
}

.avatar-group .avatar-initials:first-child {
    margin-left: 0;
}

/* =====================================================
   DASHBOARD WIDGETS
===================================================== */
.widget {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    height: 100%;
}

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

.widget-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.widget-body {
    padding: 20px;
}

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

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

.activity-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--primary);
    margin-right: 12px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.activity-time {
    font-size: 11px;
    color: var(--text-muted);
}

/* Deadline Widget */
.deadline-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.deadline-date {
    width: 48px;
    height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    margin-right: 12px;
    flex-shrink: 0;
}

.deadline-day {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.deadline-month {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.deadline-info {
    flex: 1;
}

.deadline-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.deadline-project {
    font-size: 12px;
    color: var(--text-muted);
}

.deadline-item.overdue .deadline-date {
    background: rgba(229, 62, 62, 0.1);
}

.deadline-item.overdue .deadline-day {
    color: var(--danger);
}

/* =====================================================
   CALENDAR
===================================================== */
.fc {
    font-family: inherit;
}

.fc .fc-toolbar-title {
    font-size: 18px;
    font-weight: 600;
}

.fc .fc-button-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.fc .fc-button-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.fc .fc-button-primary:disabled {
    background: var(--primary);
    border-color: var(--primary);
}

.fc .fc-button-primary:not(:disabled).fc-button-active {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.fc .fc-daygrid-day.fc-day-today {
    background: rgba(30, 58, 95, 0.05);
}

.fc .fc-event {
    border: none;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
}

.fc .fc-daygrid-event-dot {
    border-color: var(--primary);
}

/* =====================================================
   CHARTS
===================================================== */
.chart-container {
    position: relative;
    height: 300px;
}

/* =====================================================
   TABS
===================================================== */
.nav-tabs {
    border-bottom: 2px solid var(--border-light);
}

.nav-tabs .nav-link {
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    padding: 12px 20px;
    margin-bottom: -2px;
}

.nav-tabs .nav-link:hover {
    color: var(--primary);
    border: none;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    border: none;
    border-bottom: 2px solid var(--primary);
    background: transparent;
}

.tab-content {
    padding: 20px 0;
}

/* =====================================================
   PROJECT DETAILS
===================================================== */
.project-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    color: var(--text-white);
    margin-bottom: 24px;
}

.project-header h1 {
    color: var(--text-white);
    font-size: 24px;
    margin-bottom: 8px;
}

.project-meta {
    display: flex;
    gap: 24px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.project-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.project-meta-item i {
    opacity: 0.7;
}

/* =====================================================
   INVOICE
===================================================== */
.invoice-preview {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.invoice-logo img {
    max-height: 60px;
}

.invoice-company {
    text-align: right;
}

.invoice-company h2 {
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 4px;
}

.invoice-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 24px;
}

.invoice-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.invoice-to h4, .invoice-info h4 {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.invoice-table {
    width: 100%;
    margin-bottom: 30px;
}

.invoice-table th {
    background: var(--primary);
    color: var(--text-white);
    padding: 12px 16px;
    font-size: 12px;
    text-transform: uppercase;
}

.invoice-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
}

.invoice-totals {
    display: flex;
    justify-content: flex-end;
}

.invoice-totals table {
    width: 280px;
}

.invoice-totals td {
    padding: 8px 16px;
}

.invoice-totals tr:last-child td {
    font-weight: 700;
    font-size: 16px;
    background: var(--bg-light);
}

.invoice-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

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

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

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

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

    .sidebar-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 768px) {
    .page-content {
        padding: 16px;
    }

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

    .navbar-search {
        display: none;
    }

    .table-header {
        flex-direction: column;
        align-items: stretch;
    }

    .table-actions {
        flex-wrap: wrap;
    }

    .stat-card .stat-icon {
        display: none;
    }

    .login-box {
        padding: 24px;
    }
}

/* =====================================================
   PRINT STYLES
===================================================== */
@media print {
    .sidebar,
    .top-navbar,
    .btn,
    .no-print {
        display: none !important;
    }

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

    .page-content {
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .invoice-preview {
        padding: 0;
        border: none;
    }
}

/* =====================================================
   UTILITIES
===================================================== */
.text-primary { color: var(--primary) !important; }
.text-muted { color: var(--text-muted) !important; }
.bg-primary { background: var(--primary) !important; }
.border-primary { border-color: var(--primary) !important; }

.cursor-pointer { cursor: pointer; }
.hover-shadow:hover { box-shadow: var(--shadow-md); }

.min-h-screen { min-height: 100vh; }
.w-full { width: 100%; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }
