﻿/* Reset & Variables */
:root {
    --primary: #6B4EFF;
    --primary-light: #EBE6FB;
    --secondary: #EF5C91;
    --accent: #F4B846;
    --dark: #1A1A1A;
    --dark-purple: #451C6C;
    --gray-light: #F7F8FA;
    --gray-medium: #E2E8F0;
    --text-main: #2D3748;
    --text-muted: #718096;
    --white: #FFFFFF;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 30px rgba(107, 78, 255, 0.1);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;

    /* Extra variables for consistency */
    --bg-surface: #FFFFFF;
    --bg-main: #F7F8FA;
    --border-color: #E2E8F0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--gray-light);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    /* Prevent full page scroll, manage in main-content */
}

/* Layout */
.dashboard-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    background: var(--white);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--gray-medium);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--dark-purple);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.create-pitch-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gray-light);
    border: none;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 2rem;
    transition: all 0.2s ease;
}

.create-pitch-btn:hover {
    background: var(--gray-medium);
}

.plus-icon {
    background: var(--primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.nav-item:hover,
.nav-item.active {
    background-color: var(--gray-light);
    color: var(--primary);
}

.nav-item i {
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    margin-top: auto;
}

.upgrade-card {
    background: var(--primary-light);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
}

.upgrade-card p {
    font-size: 0.875rem;
    color: var(--primary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.upgrade-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    width: 100%;
    font-weight: 500;
}

/* Main Content */
.main-content {
    background: var(--gray-light);
    padding: 2rem 2.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-width: 0;
}

/* Header */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.page-title h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: var(--dark);
}

.page-title .date {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 10px;
    border-radius: 50%;
    transition: all 0.2s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.icon-btn>* {
    pointer-events: none;
}

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

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 1rem;
    background: var(--white);
    padding: 6px 12px;
    border-radius: var(--radius-xl);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    position: relative;
    user-select: none;
}

.user-profile>*:not(.profile-dropdown) {
    pointer-events: none;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    min-width: 170px;
    pointer-events: auto !important;
    padding: 8px;
    display: none;
    z-index: 1000;
}

.profile-dropdown button {
    width: 100%;
    padding: 10px 15px;
    text-align: left;
    background: none;
    border: none;
    color: var(--dark);
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.profile-dropdown button:hover {
    background: var(--gray-light);
}

.profile-dropdown button:last-child {
    color: #EF5C91;
}

.profile-dropdown button:last-child:hover {
    background: #FFF5F7;
}

/* Generic Dropdown styles for Notes */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    padding: 8px;
    min-width: 160px;
    display: none;
    z-index: 100;
    margin-top: 5px;
}

.dropdown.open .dropdown-menu {
    display: flex;
    flex-direction: column;
}

.dropdown-menu a {
    padding: 10px 15px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.dropdown-menu a:hover {
    background: var(--gray-light);
    color: var(--primary);
}

.avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 0.875rem;
}

.username {
    font-weight: 500;
    font-size: 0.875rem;
}

/* Hero Section */
.hero-banner {
    background: linear-gradient(135deg, #EBE6FB 0%, #FFFFFF 100%);
    border-radius: var(--radius-lg);
    padding: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.hero-text h2 {
    font-size: 2.5rem;
    color: var(--dark-purple);
    margin-bottom: 0.5rem;
}

.hero-text p {
    color: var(--text-muted);
    font-size: 1.125rem;
}

.hero-illustration img {
    height: 180px;
    object-fit: contain;
}

/* Overview Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform 0.2s;
    min-height: 110px;
}

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

.stat-card.dark {
    background: var(--dark-purple);
    color: white;
}

.stat-card.dark .stat-label {
    color: rgba(255, 255, 255, 0.8);
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--card-bg, #f0f0f0);
    color: var(--card-color, #333);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Projects List */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-item {
    background: var(--white);
    padding: 1rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
}

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

.project-thumb {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-details {
    flex: 1;
}

.project-details h4 {
    font-size: 1.125rem;
    margin-bottom: 4px;
    color: var(--dark);
}

.project-details p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    max-width: 600px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta-info {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-main);
    background: var(--gray-light);
    padding: 2px 8px;
    border-radius: 4px;
}

.project-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(16px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.action-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: color 0.2s;
}

.action-icon:hover {
    color: var(--secondary);
    background: var(--gray-light);
}

/* Kanban Board */
.kanban-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
    /* Adjust based on header/padding */
}

.kanban-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.kanban-controls h2 {
    color: var(--dark-purple);
}

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.primary-btn:hover {
    background: #5636cc;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    flex: 1;
    overflow-x: auto;
}

.kanban-column {
    background: #F7F8FA;
    /* Slightly darker than main bg if needed, or transparent */
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 2px solid transparent;
    background: var(--white);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    box-shadow: var(--shadow-sm);
}

.header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-title h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark);
}

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

.dot.red {
    background: #EF5C91;
}

.dot.yellow {
    background: #F4B846;
}

.dot.green {
    background: #4CAF50;
}

.header-red {
    border-bottom-color: #EF5C91;
}

.header-yellow {
    border-bottom-color: #F4B846;
}

.header-green {
    border-bottom-color: #4CAF50;
}

.count-badge {
    background: var(--gray-medium);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
}

.task-list-container {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    flex: 1;
}

.kanban-card {
    background: var(--white);
    padding: 1rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid transparent;
    position: relative;
    user-select: none;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kanban-card.status-todo {
    border-left-color: #EF5C91;
}

.kanban-card.status-in-progress {
    border-left-color: #F4B846;
}

.kanban-card.status-done {
    border-left-color: #4CAF50;
}

.card-title {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark);
    font-size: 0.95rem;
}

.card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

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

.card-delete-btn {
    background: none;
    border: none;
    color: #EF5C91;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.kanban-card:hover .card-delete-btn {
    opacity: 1;
}

.card-delete-btn:hover {
    background: #FFEBEE;
}

.kanban-column.drag-over {
    background-color: #e5e9f0;
    box-shadow: inset 0 0 0 2px var(--primary);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--white);
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-content .modal-body {
    overflow-y: auto;
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-medium);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-input,
.modal-select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-medium);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

textarea.modal-input {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

.modal-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(107, 78, 255, 0.1);
}

.modal-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-group label,
.modal-body>label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.modal-submit-btn {
    background: var(--primary);
    color: white;
    padding: 12px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    margin-top: 1rem;
    align-self: flex-end;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
}

.empty-state h2 {
    color: var(--dark-purple);
}

/* Responsiveness */
@media (max-width: 1024px) {
    .dashboard-container {
        grid-template-columns: 80px 1fr;
    }

    .logo-text,
    .create-pitch-btn span,
    .nav-item span,
    .upgrade-card {
        display: none;
    }

    .sidebar {
        padding: 1rem;
        align-items: center;
    }

    .create-pitch-btn {
        padding: 8px;
        justify-content: center;
    }

    .nav-item {
        justify-content: center;
        width: 100%;
    }

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

    .kanban-board {
        grid-template-columns: 1fr;
        /* Stack columns on mobile */
    }

    .kanban-wrapper {
        height: auto;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
        /* simple mobile behavior */
    }

    .main-content {
        padding: 1.5rem;
    }

    .hero-banner {
        flex-direction: column;
        align-items: flex-start;
        text-align: center;
        padding: 2rem;
    }

    .hero-text {
        margin-bottom: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Calendar */
.calendar-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.calendar-nav h2 {
    font-size: 1.5rem;
    color: var(--dark-purple);
    min-width: 180px;
    text-align: center;
}

.secondary-btn {
    background: var(--white);
    border: 1px solid var(--gray-medium);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    color: var(--text-main);
}

.secondary-btn:hover {
    background: var(--gray-light);
}

.calendar-views {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    padding: 4px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.view-btn {
    background: none;
    border: none;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.view-btn.active {
    background: var(--primary-light);
    color: var(--primary);
}

/* Week View Grid */
.calendar-grid {
    flex: 1;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--gray-medium);
    display: grid;
}

.week-view {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    grid-template-rows: 50px repeat(24, 60px);
    /* 24 hours */
    overflow: auto;
    max-height: calc(100vh - 200px);
}

.week-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--white);
    border-bottom: 1px solid var(--gray-medium);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    color: var(--text-muted);
    padding: 10px;
}

.week-header.today {
    color: var(--primary);
}

.week-header .day-num {
    font-size: 1.25rem;
    color: var(--dark);
    margin-top: 4px;
}

.week-header.today .day-num {
    background: var(--primary);
    color: white;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.time-slot-label {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding-right: 10px;
    padding-top: 5px;
    /* Push down slightly from the border */
    color: var(--text-muted);
    font-size: 0.8rem;
    border-right: 1px solid var(--gray-medium);
}

.calendar-cell {
    border-right: 1px solid var(--gray-medium);
    border-bottom: 1px solid var(--gray-medium);
    position: relative;
    transition: background 0.1s;
}

.calendar-cell:hover {
    background: #FAFAFA;
}

/* Events in Calendar */
.calendar-event {
    position: absolute;
    left: 4px;
    right: 4px;
    top: 2px;
    bottom: 2px;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 5;
    transition: transform 0.1s, box-shadow 0.1s;
}

.calendar-event:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.event-time {
    font-size: 0.7rem;
    opacity: 0.9;
    display: block;
    margin-bottom: 2px;
}

/* Event Modal Colors */
.color-options {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.color-option {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
}

.color-option.selected {
    border-color: var(--dark);
    transform: scale(1.1);
}

/* Month View */
.month-view {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: 40px repeat(6, 1fr);
    height: 100%;
}

.month-cell {
    border: 1px solid var(--gray-medium);
    padding: 8px;
    min-height: 100px;
    position: relative;
    background: var(--white);
}

.month-cell.today {
    background: #F8F5FF;
}

.month-cell-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 6px;
}

.month-day-num {
    font-weight: 500;
    color: var(--text-muted);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.month-cell.today .month-day-num {
    background: var(--primary);
    color: white;
}

.month-event {
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 3px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.restore-dropdown {
    min-width: 280px !important;
}

.restore-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.restore-item:hover {
    background: #f9f9f9;
}

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

.restore-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.restore-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
}

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

.restore-btn-action {
    background: var(--primary-light);
    color: var(--primary);
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.restore-btn-action:hover {
    background: var(--primary);
    color: white;
}

/* FINANCE */
.finance-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 2rem;
}

.summary-card {
    flex: 1;
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.summary-card.income .card-icon {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success);
}

.summary-card.expense .card-icon {
    background: rgba(239, 92, 145, 0.1);
    color: #EF5C91;
}

.summary-card.balance .card-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

.summary-card .card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.summary-card .label {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.summary-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
}

.finance-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 2rem;
}

.finance-form-box {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.finance-form-box h4 {
    margin-bottom: 1rem;
    color: var(--dark-purple);
}

.finance-form-box .form-group {
    margin-bottom: 1rem;
}

.finance-form-box label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
}

.full-width {
    width: 100%;
    margin-top: 10px;
}

.danger-btn {
    background: #EF5C91;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
}

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

.transaction-history {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.transaction-history h3 {
    margin-bottom: 1rem;
    color: var(--dark-purple);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--gray-medium);
}

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

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

.h-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.h-icon.income {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success);
}

.h-icon.expense {
    background: rgba(239, 92, 145, 0.1);
    color: #EF5C91;
}

.h-details span {
    display: block;
}

.h-title {
    font-weight: 500;
    color: var(--text-main);
}

.h-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.h-amount {
    font-weight: 700;
    font-size: 1.1rem;
}

.h-amount.income {
    color: var(--success);
}

.h-amount.expense {
    color: #EF5C91;
}

.delete-trans-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    margin-left: 10px;
    padding: 4px;
}

.delete-trans-btn:hover {
    color: #EF5C91;
}

@media (max-width: 768px) {

    .finance-summary,
    .finance-actions {
        flex-direction: column;
        grid-template-columns: 1fr;
    }
}

/* FINANCE HISTORY HEADER */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.history-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.view-toggle {
    background: #f3f4f6;
    padding: 4px;
    border-radius: 8px;
    display: flex;
    gap: 4px;
}

.view-toggle .toggle-btn {
    border: none;
    background: transparent;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}

.view-toggle .toggle-btn:hover {
    color: var(--text-main);
}

.view-toggle .toggle-btn.active {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.finance-date-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 10px;
    background: #fcfcfc;
    border-radius: 10px;
    border: 1px solid var(--gray-medium);
}

.date-label {
    font-weight: 500;
    color: var(--text-main);
    font-size: 1rem;
    min-width: 170px;
    pointer-events: auto !important;
    text-align: center;
}

.download-btn {
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.download-btn:hover {
    background: #f0f0f0;
    color: var(--primary);
}

.delete-all-btn:hover {
    background: var(--gray-light);
    color: #EF5C91;
}

/* DASHBOARD GRID */
.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2rem;
    width: 100%;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-width: 0;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* MINI CALENDAR */
.mini-calendar-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.mini-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.mini-cal-header h4 {
    margin: 0;
    color: var(--dark);
    font-size: 1.1rem;
    font-weight: 700;
}

.mini-cal-header .icon-btn {
    padding: 4px;
}

.mini-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.mini-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.mini-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    border-radius: 6px;
    cursor: default;
}

.mini-cal-day.today {
    background: var(--primary);
    color: white;
    font-weight: 700;
}

.mini-cal-day.other-month {
    color: #eee;
}

/* DASHBOARD TASKS & EVENTS */
.dashboard-tasks {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header a {
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.dash-task-list,
.dash-events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dash-task-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #fcfcfc;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    transition: transform 0.2s;
}

.dash-task-item:hover {
    transform: translateX(5px);
}

.task-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dash-event-item {
    padding: 10px;
    border-left: 3px solid var(--primary);
    background: #f9f9f9;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
}

.dash-event-time {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.quick-stats-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.quick-stats-card h4 {
    margin-bottom: 1rem;
}

@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* NOTES SECTION */
.notes-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    height: calc(100vh - 200px);
    overflow: hidden;
    margin-top: 1rem;
}

.notes-sidebar {
    border-right: 1px solid var(--gray-medium);
    display: flex;
    flex-direction: column;
    background: #fdfdfd;
}

.notes-sidebar-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.notes-sidebar-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

.notes-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.note-item {
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 5px;
    border-left: 3px solid transparent;
}

.note-item:hover {
    background: #f0f0f0;
}

.note-item.active {
    background: var(--primary-light);
    border-left-color: var(--primary);
}

.note-item-title {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.note-item-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notes-editor {
    display: flex;
    flex-direction: column;
    padding: 2.5rem 4rem;
    background: white;
    overflow-y: auto;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.editor-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.note-title-input {
    font-size: 2.2rem;
    font-weight: 800;
    border: none;
    outline: none;
    margin-bottom: 1.5rem;
    color: var(--dark);
    font-family: var(--font-heading);
    width: 100%;
}

.note-content-area {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-main);
    resize: none;
    font-family: var(--font-body);
    min-height: 400px;
}

.icon-only {
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 900px) {
    .notes-container {
        grid-template-columns: 1fr;
    }

    .notes-sidebar {
        display: block;
    }
}

/* CUSTOM CONFIRM MODAL */
.confirm-content {
    background: white;
    padding: 3rem 2rem;
    border-radius: 40px;
    width: 380px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.confirm-icon-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.trash-icon {
    width: 70px;
    height: 70px;
    color: #F85F5F;
    stroke-width: 1.5px;
}

.icon-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.icon-decoration span {
    position: absolute;
    color: #F85F5F;
    opacity: 0.6;
    font-size: 1.2rem;
    font-weight: bold;
}

.icon-decoration span:nth-child(1) {
    top: 0;
    left: -20px;
    transform: rotate(15deg);
}

.icon-decoration span:nth-child(2) {
    top: -10px;
    right: 0;
    font-size: 0.8rem;
}

.icon-decoration span:nth-child(3) {
    bottom: 10px;
    right: -30px;
}

.icon-decoration span:nth-child(4) {
    bottom: -20px;
    left: 10px;
    transform: rotate(-20deg);
}

.confirm-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1.4;
    padding: 0 1rem;
}

.confirm-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
}

.delete-btn-large {
    background: #F85F5F;
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    width: 100%;
}

.delete-btn-large:hover {
    background: #e54b4b;
    transform: translateY(-2px);
}

.keep-btn {
    background: none;
    border: none;
    color: #F85F5F;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: opacity 0.2s;
}

.keep-btn:hover {
    opacity: 0.8;
}

/* Admin Panel Styles */
.admin-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.admin-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-table-wrapper {
    overflow-x: auto;
}

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

.admin-table th {
    padding: 12px 16px;
    border-bottom: 2px solid var(--gray-light);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-table td {
    padding: 16px;
    border-bottom: 1px solid var(--gray-light);
    color: var(--dark-purple);
    font-size: 0.95rem;
}

.admin-table tr:hover {
    background-color: #F9FAFB;
}

.user-info-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-user {
    background: #E0E7FF;
    color: #4338CA;
}

.badge-admin {
    background: #FEF3C7;
    color: #92400E;
}

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

.admin-action-btn {
    padding: 6px;
    border-radius: 6px;
    border: 1px solid var(--gray-light);
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.admin-action-btn:hover {
    background: #F1F5F9;
    border-color: #cbd5e1;
    transform: scale(1.1);
}

.admin-action-btn.promote:hover {
    color: #4CAF50;
    border-color: #4CAF50;
}

.admin-action-btn.demote:hover {
    color: #F4B846;
    border-color: #F4B846;
}

.admin-action-btn.delete:hover {
    color: #EF5C91;
    border-color: #EF5C91;
}

/* Online Indicator Styles */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.online-dot {
    width: 10px;
    height: 10px;
    background-color: #4CAF50;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.online-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #4CAF50;
    border-radius: 50%;
    animation: pulse-online 2s infinite;
}

@keyframes pulse-online {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.offline-dot {
    width: 10px;
    height: 10px;
    background-color: #cbd5e1;
    border-radius: 50%;
}

.top-clock {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(107, 78, 255, 0.08);
    padding: 6px 14px;
    border-radius: 20px;
    letter-spacing: 1px;
    min-width: 110px;
    text-align: center;
    border: 1px solid rgba(107, 78, 255, 0.15);
    margin: 0 25px 0 10px;
    animation: clock-pulse 2s infinite ease-in-out;
}

@keyframes clock-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
        opacity: 0.9;
    }
}

/* Message and Notification Dropdowns */
.action-wrapper {
    position: relative;
    display: inline-block;
}

.action-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    width: 340px;
    max-width: calc(100vw - 20px);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--gray-medium);
    transform-origin: top right;
    animation: scaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

@media (max-width: 600px) {
    .action-dropdown {
        position: fixed !important;
        top: 70px !important;
        left: 5vw !important;
        right: 5vw !important;
        width: 90vw !important;
        max-width: none !important;
        min-width: 0 !important;
        z-index: 12000 !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    }

    .dropdown-list {
        max-height: 60vh !important;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.dropdown-header {
    padding: 16px;
    border-bottom: 1px solid var(--gray-medium);
    font-weight: 500;
    color: var(--dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #FAFAFA;
}

.dropdown-list {
    max-height: 350px;
    overflow-y: auto;
}

.dropdown-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-light);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.dropdown-item:hover {
    background: #F8FAFC;
}

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

.dropdown-item.unread {
    background: #F0F5FF;
}

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

.item-icon.warning {
    background: #FFF4E6;
    color: #F4B846;
}

.item-icon.success {
    background: #E8F5E9;
    color: #4CAF50;
}

.item-content {
    flex: 1;
}

.item-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 4px;
}

.item-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    white-space: normal !important;
    word-break: break-word !important;
}

.item-time {
    font-size: 0.75rem;
    color: #A0AEC0;
    margin-top: 6px;
    display: block;
}

.badge-count {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #EF5C91;
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(239, 92, 145, 0.4);
}

.empty-state {
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* --- RESPONSIVE DESIGN (MOBILE) --- */

/* Initially hide mobile menu button on desktop */
.mobile-menu-btn {
    display: none;
    /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    margin-right: 15px;
    padding: 8px;
    /* Bigger touch area */
    border-radius: 8px;
    color: var(--text-main);
}

.mobile-menu-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Sidebar Overlay (Mobile) */
.sidebar-overlay {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s;
}

.title-group {
    display: flex;
    flex-direction: column;
}

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

@media (max-width: 1024px) {

    /* 1. Global Performance & Scroll */
    body,
    html {
        height: auto !important;
        overflow-y: auto !important;
        background: #f8faff !important;
        -webkit-overflow-scrolling: touch;
    }

    .dashboard-container {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* 2. Ideal Fixed Header (Professional Glassmorphism) */
    .top-bar {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 65px !important;
        padding: 0 15px 0 70px !important;
        /* Make space for fixed button */
        background: rgba(255, 255, 255, 0.85) !important;
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
        z-index: 5000 !important;
        display: flex;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    /* Don't hide .page-title, only the text inside it */
    .page-title {
        display: flex;
        align-items: center !important;
    }

    .page-title h1,
    .title-group,
    .date,
    .top-clock,
    .user-info {
        display: none !important;
    }

    .mobile-menu-btn {
        display: flex !important;
        position: fixed !important;
        top: 12px !important;
        left: 15px !important;
        width: 42px !important;
        height: 42px !important;
        align-items: center !important;
        justify-content: center !important;
        background: #f3f4f6 !important;
        border-radius: 12px !important;
        color: var(--dark-purple) !important;
        z-index: 11000 !important;
        border: none !important;
        cursor: pointer !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .top-bar-actions {
        display: flex;
        align-items: center !important;
        gap: 10px !important;
    }

    .user-profile {
        margin-left: 5px !important;
        padding: 4px !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    /* 3. Main Content - Fix Overlap & Scroll */
    .main-content {
        padding: 85px 15px 60px 15px !important;
        /* Fixed header compensation */
        height: auto !important;
        overflow: visible !important;
    }

    .content-view>h1,
    .content-view>.section-header h1 {
        display: block !important;
        margin-top: 10px !important;
        margin-bottom: 25px !important;
        font-size: 1.6rem !important;
        color: var(--dark-purple) !important;
        font-weight: 700 !important;
    }

    /* 4. Finance & Grid Fixes */
    .finance-summary,
    .finance-actions {
        display: flex;
        flex-direction: column !important;
        gap: 15px !important;
    }

    .finance-form-box {
        width: 100% !important;
    }

    /* 5. Notes Mobile System */
    .notes-container {
        display: block !important;
        height: auto !important;
        min-height: 400px;
    }

    .notes-sidebar {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        border: none !important;
        background: white !important;
    }

    .notes-editor {
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        background: white !important;
        z-index: 15000 !important;
        padding: 15px !important;
        overflow-y: auto !important;
        flex-direction: column !important;
    }

    .editor-actions .secondary-btn span {
        display: none;
        /* Hide text on small buttons if needed, but let's keep it for now and see */
    }

    .note-title-input {
        font-size: 1.5rem !important;
    }

    .note-content-area {
        height: calc(100vh - 150px) !important;
    }

    .notes-container.editor-visible .notes-editor {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .notes-container.editor-visible .notes-sidebar {
        display: none !important;
    }

    .mobile-back-btn {
        display: flex;
        align-items: center;
        gap: 10px;
        background: #f3f4f6;
        color: var(--primary);
        padding: 10px 18px;
        border-radius: 12px;
        margin-bottom: 20px;
        font-weight: 600;
        border: none;
    }

    /* 6. General Cleanup */
    .dashboard-grid,
    .tasks-grid {
        display: flex;
        flex-direction: column !important;
        gap: 20px !important;
    }

    .sidebar-overlay {
        z-index: 9000 !important;
        background: rgba(0, 0, 0, 0.5) !important;
        backdrop-filter: blur(2px);
    }

    .sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 280px !important;
        height: 100vh !important;
        background: white !important;
        z-index: 10000 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        display: flex;
        flex-direction: column !important;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.1) !important;
        padding-top: 20px !important;
    }

    .sidebar .logo {
        margin-top: 50px !important;
        margin-bottom: 20px !important;
        padding-left: 20px !important;
    }

    .sidebar.mobile-open {
        transform: translateX(0) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Ensure internal items are visible */
    .sidebar .logo,
    .sidebar .nav-item {
        display: flex;
        visibility: visible !important;
        opacity: 1 !important;
        justify-content: flex-start !important;
        /* Left align items */
        padding: 12px 20px !important;
        width: 100% !important;
        gap: 15px !important;
        cursor: pointer !important;
        pointer-events: auto !important;
        /* Critical for touch */
    }

    .sidebar .logo-text,
    .sidebar .nav-item span {
        display: inline-block !important;
        visibility: visible !important;
    }
}

/* Ensure mobile elements are hidden on desktop */
@media (min-width: 1025px) {

    .mobile-menu-btn,
    .fixed-menu-btn {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

/* ADMIN BROADCAST LIST STYLES */
.broadcast-admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 6px;
    border: 1px solid #edf2f7;
    transition: all 0.2s;
}

.broadcast-admin-item:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.broadcast-admin-item .bc-info {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.broadcast-admin-item .bc-info strong {
    font-size: 0.85rem;
    color: #2d3748;
}

.broadcast-admin-item .bc-info span {
    font-size: 0.75rem;
    color: #a0aec0;
}

.broadcast-admin-item .bc-delete-btn {
    background: none;
    border: none;
    color: #e53e3e;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.broadcast-admin-item .bc-delete-btn:hover {
    background: #fee2e2;
}

/* Custom Scrollbar for list */
.admin-broadcasts-list::-webkit-scrollbar {
    width: 4px;
}

.admin-broadcasts-list::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

/* PROFILE DETAIL MODAL STYLES */
.profile-detail-modal {
    max-width: 500px !important;
    background: #ffffff !important;
    border-radius: 20px !important;
    overflow: hidden;
}

.profile-header-main {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 15px;
    margin-bottom: 25px;
}

.det-avatar {
    width: 70px;
    height: 70px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}

.det-main-info h2 {
    margin: 0;
    font-size: 1.4rem;
    color: #1a202c;
}

.det-status-badge {
    margin-top: 5px;
    display: inline-block;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 0 10px;
}

.info-group label {
    display: block;
    font-size: 0.75rem;
    color: #718096;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-size: 0.95rem;
    color: #2d3748;
    font-weight: 500;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #edf2f7;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.password-field {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    cursor: pointer;
    transition: all 0.2s;
}

.password-field:hover {
    background: #f1f5f9;
}

.eye-icon {
    width: 16px;
    height: 16px;
    color: #a0aec0;
}

/* User table adjustments */
.user-name-clickable {
    cursor: pointer;
    color: var(--primary);
    font-weight: 500;
    transition: color 0.2s;
}

.user-name-clickable:hover {
    color: #2563eb;
    text-decoration: underline;
}

.status-badge-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #4A5568;
    font-weight: 500;
}

.status-badge-inline.online {
    background: #E8F5E9;
    color: #2E7D32;
}

.status-badge-inline .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #718096;
}

.status-badge-inline.online .dot {
    background: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

/* MOBILE ADAPTATION FOR PROFILE MODAL */
@media (max-width: 600px) {
    .profile-detail-modal {
        width: 95% !important;
        margin: 10px !important;
    }

    .profile-header-main {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 15px;
    }

    .profile-info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .det-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .det-main-info h2 {
        font-size: 1.2rem;
    }

    .info-group label {
        font-size: 0.7rem;
    }

    .info-value {
        font-size: 0.9rem;
        padding: 10px;
    }
}

/* ADMIN USERS GRID STYLES */
.admin-users-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 5px;
}

.admin-user-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid #edf2f7;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.admin-user-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-light);
}

.user-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f7fafc;
}

.user-card-body {
    display: flex;
    flex-direction: column;
}

.card-status-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Responsive Grid */
@media (max-width: 900px) {
    .admin-users-grid {
        grid-template-columns: 1fr;
    }
}

/* Sunday Highlighting */
.week-header.sunday {
    color: #EF5C91 !important;
}

.calendar-cell.sunday {
    background-color: rgba(239, 92, 145, 0.03);
}

.month-cell.sunday {
    background-color: #FFF5F7 !important;
}

.month-cell.sunday .month-day-num {
    color: #EF5C91;
}

/* Year View Logic */
.year-view {
    display: block !important;
    overflow-y: auto;
    padding: 20px;
}

.year-grid-internal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.year-month-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #eee;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.year-month-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
}

.year-month-card.current-month {
    border: 2px solid var(--primary);
    background: var(--primary-light);
}

.year-month-card .month-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.year-month-card .month-preview {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Settings Page Styles */
.settings-container {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.settings-sidebar {
    flex: 0 0 300px;
    background: white;
    border-radius: 24px;
    padding: 40px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    height: fit-content;
}

.settings-avatar-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.settings-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-light);
}

.avatar-edit-icon {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--primary);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 3px solid white;
    transition: transform 0.2s;
}

.avatar-edit-icon:hover {
    transform: scale(1.1);
}

.settings-user-info h3 {
    font-size: 1.25rem;
    margin-bottom: 5px;
    color: var(--dark);
}

.settings-user-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.settings-nav-item i {
    width: 20px;
}

.settings-nav-item:hover,
.settings-nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
}

.settings-nav-item.danger {
    color: #EF5C91;
}

.settings-nav-item.danger:hover {
    background: #FFF5F7;
}

.settings-content-card {
    flex: 1;
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.settings-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.settings-header h2 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 5px;
}

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

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group-settings {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group-settings label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark);
}

.settings-input {
    padding: 12px 16px;
    border: 2px solid #F1F5F9;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    background: #F8FAFC;
}

.settings-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

.settings-input:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.input-with-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon-wrapper .settings-input {
    width: 100%;
    padding-right: 120px;
}

.verified-badge {
    position: absolute;
    right: 15px;
    color: #4ADB97;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.settings-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

@media (max-width: 992px) {
    .settings-container {
        flex-direction: column;
    }

    .settings-sidebar {
        flex: none;
        width: 100%;
    }

    .form-row {
        flex-direction: column;
    }
}