:root {
    /* Palette: Hiper Mega Super Smart Dark Mode */
    --color-bg: #0f1115;
    --color-sidebar: #16181d;
    --color-primary: #00E676; /* Neon Green */
    --color-secondary: #2979FF; /* Sci-fi Blue */
    --color-accent: #FFEA00; /* Yield Yellow */
    --color-danger: #FF1744;
    --color-warning: #FF9100;
    --surface-card: #1e2128;
    --surface-hover: #2a2d35;
    --text-main: #ffffff;
    --text-muted: #9499a8;
    --border-color: rgba(255, 255, 255, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; -webkit-tap-highlight-color: transparent; }

body { 
    background-color: var(--color-bg); 
    color: var(--text-main); 
    display: flex; 
    min-height: 100vh; 
    overflow-x: hidden; 
    font-size: 16px; 
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--color-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column;
    position: fixed; height: 100vh;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand {
    padding: 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    display: flex; align-items: center; gap: 0.5rem;
    letter-spacing: -0.5px;
}

.nav-menu { 
    flex: 1; padding: 0 1rem; 
    display: flex; flex-direction: column; gap: 0.5rem; 
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch;
}
.nav-menu::-webkit-scrollbar { width: 4px; }
.nav-menu::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

.nav-item {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-item:hover, .nav-item.active {
    background-color: rgba(0, 230, 118, 0.1);
    color: var(--color-primary);
}

.nav-item i { font-size: 1.4rem; }

/* Main Content */
.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 2.5rem;
    width: calc(100% - 260px);
    transition: margin-left 0.3s ease;
}

/* Cards */
.card {
    background: var(--surface-card);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.frame-hover:active { transform: scale(0.98); }
@media (hover: hover) {
    .frame-hover:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.3); border-color: rgba(0, 230, 118, 0.3); }
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.8rem 1.5rem; border: none; border-radius: 10px;
    font-weight: 600; cursor: pointer; transition: 0.2s;
    text-decoration: none; font-size: 0.95rem; user-select: none;
}
.btn-primary { background: var(--color-primary); color: #000; }
.btn-primary:active { filter: brightness(0.9); }
@media (hover: hover) {
    .btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
}

.btn-secondary { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border-color); }
.btn-secondary:active, .btn-secondary:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card .stat-header { display: flex; justify-content: space-between; align-items: flex-start; }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; margin-top: 0.5rem; word-break: break-word; }

.stat-icon {
    width: 48px; height: 48px; 
    background: rgba(0, 230, 118, 0.1); color: var(--color-primary);
    border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}

/* Forms */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--text-muted); font-size: 0.9rem; }
.form-control, input[type="text"], input[type="number"], input[type="date"], input[type="datetime-local"], input[type="password"], input[type="email"], select, textarea {
    width: 100%; padding: 0.9rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff; font-size: 1rem;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}
.form-control:focus, input:focus, select:focus, textarea:focus { outline: none; border-color: var(--color-primary); background: rgba(0,0,0,0.2); }

/* Tables */
.table-container { 
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; 
    margin: 0 -1.5rem; 
    padding: 0 1.5rem; 
}
.table { width: 100%; border-collapse: collapse; text-align: left; min-width: 600px; }
.table th { 
    padding: 1rem 1.5rem; 
    white-space: nowrap; 
    color: var(--text-muted); 
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255,255,255,0.02);
}
.table td { 
    padding: 1rem 1.5rem; 
    white-space: nowrap; 
    border-bottom: 1px solid var(--border-color);
}
.table tr:last-child td { border-bottom: none; }

/* Form Utilities */
.form-container { max-width: 800px; margin: 0 auto; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
@media (max-width: 768px) { .form-grid-2 { grid-template-columns: 1fr; gap: 1rem; } }

/* Page Header */
.page-header { margin-bottom: 2rem; }
.page-title { font-size: 1.8rem; font-weight: 600; margin-bottom: 0.5rem; }
.page-subtitle { color: var(--text-muted); }

/* Card Header */
.card-header {
    padding: 1.5rem; 
    border-bottom: 1px solid var(--border-color); 
    display: flex; justify-content: space-between; align-items: center;
}


/* Animations */
.animate-fade-in { animation: fadeIn 0.5s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }


/* Kanban Styles */
.kanban-container {
    display: flex; 
    gap: 1rem; 
    overflow-x: auto; 
    padding-bottom: 2rem; 
    min-height: 600px;
    scroll-snap-type: x mandatory;
}
.kanban-column {
    flex: 1; 
    min-width: 280px; 
    background: rgba(255,255,255,0.02); 
    border: 1px solid var(--border-color); 
    border-radius: 12px; 
    display: flex; 
    flex-direction: column;
    scroll-snap-align: center;
}
.kanban-header {
    padding: 1rem; 
    border-bottom: 1px solid var(--border-color); 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
}
.kanban-body {
    padding: 1rem; 
    flex: 1; 
    display: flex; 
    flex-direction: column;
    gap: 1rem;
}
.count-badge {
    background: rgba(255,255,255,0.1); 
    padding: 0.2rem 0.6rem; 
    border-radius: 10px; 
    font-size: 0.8rem;
    font-weight: 600;
}
.draggable { cursor: grab; user-select: none; }
.draggable.dragging { opacity: 0.5; cursor: grabbing; }


/* Mobile Overlay */
.mobile-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 900;
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
    backdrop-filter: blur(4px);
}
.mobile-overlay.active { opacity: 1; pointer-events: auto; }

/* Mobile Responsive Rules */
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1.5rem;
        padding-top: 5rem;
    }

    .mobile-header {
        position: fixed; top: 0; left: 0; right: 0; height: 60px;
        background: rgba(22, 24, 29, 0.9);
        backdrop-filter: blur(10px);
        z-index: 800;
        display: flex; align-items: center; padding: 0 1rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    }
    
    .mobile-menu-btn { 
        display: flex !important; align-items: center; justify-content: center;
        background: transparent; border: none !important; color: #fff; font-size: 1.8rem;
        cursor: pointer; padding: 0.5rem; box-shadow: none !important; position: static !important;
    }

    .brand-mobile {
        margin-left: 1rem; font-weight: 700; font-size: 1.2rem; color: var(--color-primary);
        display: flex; align-items: center; gap: 0.5rem;
    }

    .dashboard-grid { gap: 1rem; }
    .kanban-container { gap: 1rem; padding-right: 1.5rem; }
    .nav-item { padding: 1.1rem; }
}

@media (max-width: 480px) {
    .stat-card .stat-value { font-size: 1.6rem; }
    .btn { width: 100%; margin-bottom: 0.5rem; }
    .card { padding: 1.2rem; }
    div[style*="grid-template-columns"] { 
        grid-template-columns: 1fr !important; gap: 1rem !important;
    }
}

