/* 
 * Hexamedia Flow - Premium Design System
 * Updated to match modern Webadmin aesthetics with Dark/Light Support
 */


:root {
    /* Light Mode (Hexamedia Standard Palette) - Now the only mode */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f3f5;
    --accent-primary: #f3d34a;
    /* Hexamedia Yellow */
    --accent-secondary: #e5c53d;
    --text-primary: #12141d;
    --text-secondary: #343a40;
    --text-tertiary: #616e7a;
    --border-color: #e9ecef;

    /* Vibrant Hexamedia Accents */
    --hm-purple: #9b87f5;
    --hm-pink: #f587f5;
    --hm-orange: #f58757;
    --hm-teal: #33d1b1;

    --success: #0ab39c;
    --warning: #f7b84b;
    --danger: #f06548;

    --shadow-soft: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.08);
    --radius-lg: 1.25rem;
    --radius-md: 0.75rem;
    --transition-base: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 280px;
    --card-padding: 1.5rem;
    --grid-gap: 2rem;
    --sidebar-transition: transform 0.3s ease, width 0.3s ease;
}


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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
}

body.highlight-mode .task-card:not(.highlighted-task) {
    opacity: 0.35;
    transition: opacity 0.4s ease;
}

body.highlight-mode .task-card.highlighted-task {
    background-color: #12141d !important;
    color: #ffffff !important;
    border-color: var(--accent-primary) !important;
    transform: scale(1.03) !important;
    box-shadow: 0 10px 30px rgba(243, 211, 74, 0.4) !important;
    z-index: 10;
    position: relative;
    border-left-width: 6px !important;
}

body.highlight-mode .task-card.highlighted-task h4 {
    color: #ffffff !important;
}

body.highlight-mode .task-card.highlighted-task .meta-indicators,
body.highlight-mode .task-card.highlighted-task .meta-item {
    color: rgba(255, 255, 255, 0.8) !important;
}

body.highlight-mode .task-card.highlighted-task .compact-chip {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand h1 {
    font-family: 'Familjen Grotesk', sans-serif;
    font-weight: 700;
}

button,
select,
input,
textarea {
    font-family: inherit;
    border: none;
    cursor: pointer;
    background: none;
    transition: var(--transition-base);
}


/* Force standard color-scheme */
input[type="date"],
input[type="datetime-local"],
input[type="time"],
select {
    color-scheme: light;
}

/* Global Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.app-container {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    height: 100vh;
    transition: grid-template-columns 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-container.collapsed-sidebar {
    --sidebar-width: 80px;
}

.collapsed-sidebar .sidebar-footer {
    display: none !important;
}

/* Login Styling */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    z-index: 10000;
}

.login-container.hidden {
    display: none !important;
}

.login-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
    width: 100%;
}

.login-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-color: #ffffff;
}

.login-box {
    width: 100%;
    max-width: 360px;
    animation: fadeIn 0.8s ease-out;
}

.login-logo-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.login-side-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-primary);
}

.login-side-brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: #12141d;
    font-family: 'Familjen Grotesk', sans-serif;
}

.login-side-brand span {
    font-weight: 300;
    color: #616e7a;
}

.login-welcome h1 {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
    color: #12141d;
}

.login-welcome p {
    color: #616e7a;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.login-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    color: #12141d;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.login-input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background-color: #ffffff;
    color: #12141d;
}

.login-input:focus {
    border-color: var(--accent-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(243, 211, 74, 0.15);
}

.login-error-text {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 1rem;
    text-align: center;
}

.login-btn-submit {
    width: 100%;
    padding: 0.85rem;
    background-color: #e9ecef;
    color: #12141d;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    margin-top: 1.25rem;
    transition: all 0.2s;
}

.login-btn-submit:hover {
    background-color: #dee2e6;
}

.login-divider {
    display: flex;
    align-items: center;
    margin: 1.25rem 0;
    color: #adb5bd;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: #e9ecef;
}

.login-divider span {
    padding: 0 1rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.login-btn-social {
    width: 100%;
    padding: 0.85rem;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    color: #343a40;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.login-btn-social:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #616e7a;
}

.login-footer a {
    color: #0066ff;
    text-decoration: none;
    font-weight: 600;
}

.login-demo-creds {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed #e9ecef;
    text-align: center;
    font-size: 0.75rem;
    color: #adb5bd;
}

.login-image-side {
    background-image: url('https://images.unsplash.com/photo-1552664730-d307ca884978?auto=format&fit=crop&q=80&w=1600');
    background-size: cover;
    background-position: center;
    height: 100%;
    position: relative;
}

.login-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    padding: 4rem;
    color: #ffffff;
}

.login-quote {
    max-width: 500px;
}

.login-quote p {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 2rem;
    font-family: 'Familjen Grotesk', sans-serif;
}

.quote-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quote-author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
}

.quote-author div {
    display: flex;
    flex-direction: column;
}

.quote-author strong {
    font-size: 1rem;
}

.quote-author span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

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

    .login-image-side {
        display: none;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Sidebar Styling */
.sidebar {
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    z-index: 50;
    position: relative;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center-align by default */
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    width: 100%;
    /* Take full width for easier centering */
    overflow: hidden;
}

.brand:hover {
    background-color: transparent;
}

.brand-icon {
    width: 40px;
    height: 40px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.brand h1 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: capitalize;
    white-space: nowrap;
    color: #12141d;
}

.brand span {
    color: #adb5bd;
    /* Dimmer grey than #12141d */
    font-weight: 500;
}

/* Collapsed Sidebar Logic - Premium Smoothness */
.collapsed-sidebar .brand h1,
.collapsed-sidebar .nav-item span,
.collapsed-sidebar .nav-group-trigger span,
.collapsed-sidebar .nav-group-trigger .chevron,
.collapsed-sidebar .nav-group-items {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    width: 0;
    margin: 0;
    padding: 0;
    transform: translateX(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar {
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1), padding 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.collapsed-sidebar .sidebar {
    padding: 1.5rem 0.75rem;
}

.collapsed-sidebar .sidebar-footer {
    display: none;
}

.collapsed-sidebar .sidebar-header {
    justify-content: center;
}

.collapsed-sidebar .brand {
    padding: 0;
    justify-content: center;
    cursor: pointer;
    width: 100%;
    gap: 0;
}

.custom-app-logo {
    margin-right: 0.75rem;
    transition: all 0.3s;
}

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

.collapsed-sidebar .nav-item,
.collapsed-sidebar .nav-group-trigger {
    justify-content: center;
    padding: 0.75rem;
    width: 48px;
    height: 48px;
    margin: 0 auto;
    gap: 0;
    overflow: hidden;
}

.collapsed-sidebar .nav-item i,
.collapsed-sidebar .nav-group-trigger i {
    margin: 0;
    width: 20px;
    height: 20px;
}

.collapsed-sidebar .nav-menu {
    align-items: center;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

/* Custom Scrollbar for Nav */
.nav-menu::-webkit-scrollbar {
    width: 4px;
}

.nav-menu::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.nav-item,
.nav-group-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    text-align: left;
    width: 100%;
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
}

.nav-item span,
.nav-group-trigger span {
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover,
.nav-group-trigger:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-item.active {
    background-color: var(--accent-primary);
    color: var(--text-primary) !important;
    font-weight: 700;
    box-shadow: 0 8px 16px rgba(243, 211, 74, 0.25);
}

.cal-filter-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Montserrat', sans-serif;
}

.cal-filter-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.cal-filter-btn.active {
    background: #12141d;
    color: #fff;
}

[data-theme="dark"] .cal-filter-btn.active {
    background: var(--accent-primary);
    color: #12141d;
}

.nav-item i,
.nav-group-trigger i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-group-trigger .chevron {
    margin-left: auto;
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.nav-group.expanded .nav-group-trigger {
    color: var(--text-primary);
}

.nav-group.expanded .chevron {
    transform: rotate(180deg);
}

/* Sub-items list */
.nav-group-items {
    display: flex;
    flex-direction: column;
    padding-left: 2.25rem;
    position: relative;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), margin 0.3s ease;
}

.nav-group.expanded .nav-group-items {
    max-height: 500px;
    /* Large enough for any group */
    margin: 0.25rem 0 0.5rem 0;
}

/* Connection line */
.nav-group-items::before {
    content: '';
    position: absolute;
    left: 1.35rem;
    top: 0;
    bottom: 0;
    width: 1.5px;
    background-color: var(--border-color);
    opacity: 0.6;
}

.nav-sub-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.5rem;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    transition: all 0.2s ease;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    position: relative;
}

.nav-sub-item::after {
    content: '';
    position: absolute;
    left: -0.95rem;
    /* center on the line */
    width: 6px;
    height: 6px;
    background-color: var(--border-color);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.nav-sub-item:hover {
    color: var(--text-primary);
}

.nav-sub-item:hover::after {
    background-color: var(--accent-primary);
    transform: scale(1.2);
}

.nav-sub-item.active {
    color: var(--accent-primary);
    font-weight: 700;
}

.nav-sub-item.active::after {
    background-color: var(--accent-primary);
    transform: scale(1.3);
    box-shadow: 0 0 8px var(--accent-primary);
}

.sidebar-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Header Styling */
header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
    transition: background-color 0.3s;
    z-index: 100;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--bg-primary);
    /* Changed from tertiary */
    border: 1px solid var(--border-color);
    padding: 0 1.25rem;
    border-radius: 2rem;
    /* Round search bar like modern apps */
    width: 100%;
    max-width: 480px;
    height: 44px;
    gap: 0.75rem;
    transition: var(--transition-base);
}

.search-bar:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(43, 92, 231, 0.1);
}

.search-bar input {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 100%;
    outline: none;
}

.search-bar i {
    color: var(--text-tertiary);
    width: 18px;
    height: 18px;
}

.search-results-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    max-height: 400px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    overflow-y: auto;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.search-result-group {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.search-result-group:last-child {
    border-bottom: none;
}

.search-result-header {
    padding: 0.25rem 1rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: var(--bg-primary);
}

.search-result-item {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: var(--transition-base);
    color: var(--text-primary);
    text-decoration: none;
}

.search-result-item:hover {
    background-color: var(--bg-tertiary);
}

.search-result-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    background-color: rgba(243, 211, 74, 0.15);
    border-radius: 6px;
}

.search-result-icon i {
    width: 14px;
    height: 14px;
    color: var(--accent-primary);
}

.search-result-details {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.search-result-title {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-subtitle {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    background-color: var(--danger);
    color: white;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-secondary);
    line-height: 1;
}

.notifications-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: -20px;
    /* Align slightly right so it's not offscreen */
    width: 350px;
    max-height: 400px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    overflow-y: auto;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.notifications-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
}

.btn-mark-read {
    font-size: 0.75rem;
    color: var(--accent-primary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-weight: 600;
}

.btn-mark-read:hover {
    text-decoration: underline;
}

.notification-item {
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
    color: var(--text-primary);
}

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

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

.notification-item.unread {
    background-color: rgba(243, 211, 74, 0.05);
    /* Slight yellow tint for unread */
}

.notification-item.unread:hover {
    background-color: rgba(243, 211, 74, 0.1);
}

.notification-icon-wrapper {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon-wrapper.danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.notification-icon-wrapper.warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--warning, #f59e0b);
}

.notification-icon-wrapper.info {
    background-color: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.notification-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.notification-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
}

.notification-desc {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    line-height: 1.4;
}

.notification-time {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    align-self: flex-end;
    margin-top: 0.25rem;
}

.notification-empty {
    padding: 3rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    text-align: center;
}

.notification-empty i {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.notification-empty p {
    font-size: 0.85rem;
    margin: 0;
}

.user-profile-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-base);
    margin-left: 0.5rem;
}

.user-profile-header:hover {
    background-color: var(--bg-tertiary);
}

.user-profile-header img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.user-profile-header .user-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
}

.user-profile-header .user-info p {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    line-height: 1.2;
}

/* UI Elements */
.btn-primary {
    background-color: var(--accent-primary);
    color: var(--text-primary);
    padding: 0.75rem 1.75rem;
    border-radius: 2rem;
    /* Pill shape */
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 6px 20px rgba(243, 211, 74, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.btn-primary:hover {
    background-color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(243, 211, 74, 0.35);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    padding: 0.6rem 1.25rem;
    border-radius: 2rem;
    font-weight: 700;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-base);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #1a1d21;
    /* Dark like reference */
    color: #fff;
    border-color: #1a1d21;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    margin-bottom: 1.5rem;
}

.btn-back:hover {
    color: var(--accent-primary);
    transform: translateX(-4px);
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border-radius: 50%;
    position: relative;
}

.btn-icon:hover {
    background-color: var(--bg-tertiary);
    color: var(--accent-primary);
}

/* Main Layout */
.main-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--bg-primary);
    /* Ensure light background in normal mode */
}

#content-area {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

/* Dashboard Enhancements */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--bg-secondary);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.08), 0 8px 8px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--accent-primary);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-info h3 {
    font-family: 'Familjen Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
}

.stat-info p {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-select {
    transition: border-color 0.2s;
}

.filter-select:hover {
    border-color: var(--accent-primary);
}

/* Kanban Styles Refined */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(5, minmax(240px, 1fr));
    gap: 1rem;
    padding-bottom: 2rem;
    overflow-x: auto;
    align-items: flex-start;
}

.kanban-column {
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: var(--radius-lg);
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    height: fit-content;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kanban-column:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.07);
}

[data-theme="dark"] .kanban-column {
    background-color: rgba(255, 255, 255, 0.02);
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.column-header span:first-child {
    font-weight: 800;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.column-count {
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
}

.task-list {
    flex: 1;
    padding: 0.75rem;
    overflow-y: auto;
    min-height: 100px;
}

.task-card {
    background-color: var(--bg-secondary);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
    border-left: 4px solid var(--accent-primary);
    margin-bottom: 0.75rem;
    user-select: none;
}

.task-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
    border-color: rgba(243, 211, 74, 0.5);
}

.task-card.priority-high {
    border-left-color: var(--warning);
}

.task-card.priority-urgent {
    border-left-color: var(--danger);
}

.task-card h4 {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Task description removed from Kanban cards */
.task-card .task-desc {
    display: none;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.6rem;
}

.meta-indicators {
    display: flex;
    gap: 0.6rem;
    color: var(--text-tertiary);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.65rem;
}

.meta-item i {
    width: 12px;
    height: 12px;
}

.task-card-chips {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.compact-chip {
    font-size: 0.6rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s;
}

.modal.hidden {
    display: none;
    opacity: 0;
}

.modal-content {
    background-color: var(--bg-secondary);
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    animation: slideUp 0.3s ease-out;
}

.modal-xl {
    max-width: 1000px;
    width: 90%;
    border-radius: 1rem;
}

.modal-body-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    min-height: 550px;
}

.modal-main-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: #1e2125;
    /* Match reference dark */
}

.modal-sidebar {
    background: #25292e;
    /* Slightly lighter Sidebar */
    border-left: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.task-title-input {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    border: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 0.5rem 0 !important;
    background: transparent !important;
    width: 100%;
    margin-bottom: 1rem;
    color: #fff !important;
}

.task-title-input:focus {
    border-bottom-color: var(--accent-primary) !important;
    box-shadow: none !important;
}

.sidebar-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #878a99;
    /* Grey labels like reference */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.sidebar-group select,
.sidebar-group input {
    background: #1a1d21 !important;
    border: 1px solid #32383e !important;
    color: #ced4da !important;
    border-radius: 0.4rem !important;
}

/* Comments Styling */
.comment-item {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}

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

.comment-author {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
}

.comment-date {
    font-size: 0.65rem;
    color: #878a99;
}

.comment-bubble {
    font-size: 0.85rem;
    background: #2a2f34;
    border: 1px solid #32383e;
    padding: 0.6rem 1rem;
    border-radius: 0.75rem;
    color: #ced4da;
    line-height: 1.5;
}

.comment-input-container {
    display: flex;
    gap: 0.75rem;
    background: #1a1d21;
    padding: 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid #32383e;
    margin-top: 1rem;
}

.comment-input-container input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    outline: none;
    font-size: 0.85rem;
}



@media (max-width: 900px) {
    .modal-body-layout {
        grid-template-columns: 1fr;
    }

    .modal-sidebar {
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
}

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

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

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

.modal-footer {
    padding: 1.25rem 1.5rem;
    background-color: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Forms */
.form-group {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.border-right {
    border-right: 1px solid var(--border-color);
}

.form-group.border-bottom {
    border-bottom: 1px solid var(--border-color);
}

.form-section-title {
    padding: 1.25rem 1.25rem 0.5rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-primary);
    letter-spacing: 0.05em;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
}

.form-group input:focus,
.filter-select:focus {
    border-color: var(--accent-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(243, 211, 74, 0.1);
}

/* Premium Custom Dropdown */
.form-dropdown {
    position: relative;
    width: 100%;
    z-index: 1010;
    overflow: visible;
}

.dropdown-trigger {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 0.7rem 1rem;
    color: #12141d;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.dropdown-trigger .selected-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-trigger:hover {
    border-color: var(--accent-primary);
}

.form-dropdown.active .dropdown-trigger {
    border-color: var(--accent-primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(243, 211, 74, 0.1);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 1px solid #f1f3f5;
    z-index: 2000;
    max-height: 250px;
    overflow-y: auto;
    padding: 0.5rem;
    display: none;
    animation: slideDownFade 0.2s ease-out;
}

.form-dropdown.active {
    z-index: 2000;
}

.form-dropdown.active .dropdown-menu {
    display: block;
}

.dropdown-item {
    padding: 0.65rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #12141d;
    cursor: pointer;
    border-radius: 0.6rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: var(--accent-primary);
}

.dropdown-item.selected {
    background: rgba(243, 211, 74, 0.1);
    color: #12141d;
    font-weight: 700;
}

/* Dark Theme Variant for Dropdowns */
.form-dropdown.dark .dropdown-menu {
    background: #1e2125;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.form-dropdown.dark .dropdown-item {
    color: rgba(255, 255, 255, 0.8);
}

.form-dropdown.dark .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-primary);
}

.form-dropdown.dark .dropdown-item.selected {
    background: rgba(243, 211, 74, 0.15);
    color: white;
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Custom Date Dropdown from reference */
.date-dropdown {
    position: relative;
    display: inline-block;
}

.date-trigger {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    min-width: 160px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-base);
}

.date-trigger:hover {
    border-color: var(--accent-primary);
}

.date-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-card);
    width: 240px;
    z-index: 1001;
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    animation: fadeIn 0.15s ease-out;
}

.date-menu.show {
    display: flex;
}

.date-option {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.2s;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-option:hover {
    background: var(--bg-tertiary);
}

.date-option.active {
    background: rgba(243, 211, 74, 0.15);
    color: var(--text-primary);
    font-weight: 700;
}

.custom-range-box {
    padding: 1rem 0.5rem 0.5rem;
    border-top: 1px solid #32383e;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.custom-range-box label {
    font-size: 0.65rem;
    color: #878a99;
    font-weight: 700;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.25rem;
}

.custom-range-box input {
    width: 100%;
    padding: 0.5rem !important;
    font-size: 0.8rem;
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 0.4rem !important;
    color: var(--text-primary) !important;
    outline: none;
}

.custom-range-box input:focus {
    border-color: var(--accent-primary) !important;
}

.apply-dates {
    width: 100%;
    padding: 0.6rem;
    background: var(--accent-primary);
    color: var(--text-primary);
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 0.5rem;
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
}

.apply-dates:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

.filter-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hide-mobile {
    @media (max-width: 768px) {
        display: none;
    }
}

/* Premium Dropdowns */
.premium-dropdown {
    position: relative;
    user-select: none;
}

.premium-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 170px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.6rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-base);
}

.premium-trigger:hover {
    border-color: var(--accent-primary);
    background: var(--bg-primary);
}

.premium-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    min-width: 220px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-card);
    z-index: 1000;
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 2px;
    animation: fadeIn 0.15s ease-out;
}

.premium-menu.show {
    display: flex;
}

.premium-option {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.premium-option:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.premium-option.active {
    background: rgba(243, 211, 74, 0.1);
    color: var(--text-primary);
    font-weight: 600;
}

/* Specific for Date Dropdown consistency */
.date-dropdown {
    position: relative;
}

.date-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.6rem;
    color: var(--text-primary);
    cursor: pointer;
    min-width: 170px;
}

.date-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    min-width: 220px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-card);
    z-index: 1000;
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    animation: fadeIn 0.15s ease-out;
}

.date-menu.show {
    display: flex;
}

.date-option {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    border-radius: 0.5rem;
    cursor: pointer;
}

.date-option:hover {
    background: var(--bg-tertiary);
}

.date-option.active {
    background: rgba(243, 211, 74, 0.1);
    font-weight: 600;
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    z-index: 1000;
}

.chat-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--text-primary);
    /* Dark bubble like HM style */
    color: var(--accent-primary);
    /* Yellow details */
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-bubble:hover {
    transform: scale(1.1);
}

.chat-bubble i {
    width: 28px;
    height: 28px;
}

.chat-window {
    position: absolute;
    bottom: calc(100% + 1rem);
    right: 0;
    width: 380px;
    height: 550px;
    background: var(--bg-secondary);
    border-radius: 1.5rem;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-window.hidden {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
}

.chat-window-header {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 0.9rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.message {
    padding: 0.85rem 1.25rem;
    border-radius: 1.25rem;
    font-size: 0.875rem;
    max-width: 85%;
    line-height: 1.5;
    position: relative;
}

.system-message {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 0.25rem;
    align-self: flex-start;
}

.user-message {
    background: var(--text-primary);
    color: #fff;
    border-bottom-right-radius: 0.25rem;
    align-self: flex-end;
}

.message .time {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    display: block;
    margin-top: 0.4rem;
}

.chat-input-area {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    background: var(--bg-secondary);
}

.chat-input-area input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
}

.chat-input-area input:focus {
    border-color: var(--accent-primary);
}

/* User Dropdown Menu */
.user-profile-header {
    position: relative;
    user-select: none;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 200px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    animation: fadeIn 0.15s ease-out;
    max-height: 480px;
    overflow-y: auto;
}

.dropdown-header {
    padding: 0.75rem 1rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.user-dropdown-menu.hidden {
    display: none !important;
}

.dropdown-item {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition-base);
}

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

.dropdown-item i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}

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

.dropdown-item.text-danger:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

/* Custom Flatpickr Theme for Hexamedia */
.flatpickr-calendar {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-card) !important;
    border-radius: 1rem !important;
    font-family: 'Montserrat', sans-serif !important;
    padding: 0.5rem !important;
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
    border-bottom-color: var(--bg-secondary) !important;
}

.flatpickr-month {
    background: transparent !important;
    color: var(--text-primary) !important;
    margin-bottom: 0.5rem !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    font-family: 'Familjen Grotesk', sans-serif !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
    background: var(--bg-tertiary) !important;
}

.flatpickr-current-month input.cur-year {
    font-family: 'Familjen Grotesk', sans-serif !important;
    font-weight: 700 !important;
}

.flatpickr-weekday {
    background: transparent !important;
    color: var(--text-tertiary) !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
}

.flatpickr-day {
    color: var(--text-primary) !important;
    border-radius: 0.5rem !important;
    border: 1px solid transparent !important;
    font-weight: 500 !important;
}

.flatpickr-day.today {
    border-color: var(--accent-primary) !important;
    color: var(--text-primary) !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected.prevMonthDay,
.flatpickr-day.startRange.prevMonthDay,
.flatpickr-day.endRange.prevMonthDay,
.flatpickr-day.selected.nextMonthDay,
.flatpickr-day.startRange.nextMonthDay,
.flatpickr-day.endRange.nextMonthDay {
    background: var(--accent-primary) !important;
    color: var(--bg-primary) !important;
    border-color: var(--accent-primary) !important;
    font-weight: 700 !important;
}

.flatpickr-day:hover {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
}

.flatpickr-day.inRange {
    background: rgba(var(--accent-primary-rgb), 0.1) !important;
    border-color: transparent !important;
    box-shadow: -5px 0 0 rgba(var(--accent-primary-rgb), 0.1), 5px 0 0 rgba(var(--accent-primary-rgb), 0.1) !important;
    /* Requires accent-primary-rgb variable or fallback to hex */
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: var(--text-tertiary) !important;
}



@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

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

/* --- Task Modal Redesign (V2) --- */
.task-modal-v2 {
    max-width: 950px !important;
    border-radius: 1.25rem !important;
    overflow: hidden;
    background: #fff !important;
    color: #1e293b !important;
}

.task-modal-v2 .modal-header {
    background: #fff;
    border-bottom: 1px solid #f1f3f5;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.task-modal-v2 .modal-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    max-height: 75vh;
    overflow-y: auto;
    background: #fff;
}

.task-modal-v2 .modal-footer {
    padding: 1.25rem 2rem;
    background: #fbfcfd;
    border-top: 1px solid #f1f3f5;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    align-items: center;
}

/* Priority Pills */
.priority-pills-container {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.priority-pill {
    padding: 0.35rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
    /* default overriden later */
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    letter-spacing: 0.05em;
}

.priority-pill:hover:not(:disabled) {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.05);
}

.priority-pill.active {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.priority-pill:disabled {
    cursor: default;
    opacity: 0.7;
}

/* Blocks Logic */
.modal-block {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.block-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f1f3f5;
}

.block-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

/* Field Styles */
.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.task-modal-v2 label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.task-modal-v2 select,
.task-modal-v2 input:not([type="checkbox"]),
.task-modal-v2 textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.9rem;
    color: #1e293b !important;
    font-weight: 500;
    transition: all 0.2s ease;
}

.task-modal-v2 textarea {
    min-height: 140px;
    line-height: 1.6;
}

.task-modal-v2 select:focus,
.task-modal-v2 input:focus,
.task-modal-v2 textarea:focus {
    background: #fff;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(243, 211, 74, 0.1);
    outline: none;
}

.task-modal-v2 select:disabled,
.task-modal-v2 input:disabled,
.task-modal-v2 textarea:disabled {
    background: #fbfcfd;
    border-color: #f1f3f5;
    color: #94a3b8 !important;
    cursor: initial;
}

/* Title Special Style */
#task-title-container {
    flex: 1;
}

#task-title {
    font-family: 'Familjen Grotesk', sans-serif;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    padding: 0.5rem 0 !important;
    color: #1e293b !important;
    text-align: left !important;
}

#task-title:focus {
    box-shadow: none !important;
    border-bottom-color: var(--accent-primary) !important;
}

/* Collapsible Activity */
.activity-section {
    border-radius: 1rem;
    background: #fbfcfd;
    border: 1px solid #f1f3f5;
    margin-top: 1rem;
}

.activity-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.activity-header:hover {
    background: #f1f5f9;
}

.activity-content {
    border-top: 1px solid #f1f3f5;
    padding: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.activity-locked-msg {
    padding: 2.5rem;
    text-align: center;
    background: #f8fafc;
    border-radius: 1rem;
    border: 1px dashed #e2e8f0;
    color: #94a3b8;
}

/* Service indicator animation */
#service-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

#service-status-indicator span:first-child {
    animation: pulse-status 2s infinite;
}

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

    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Footer Button */
.btn-primary-v2 {
    background: var(--accent-primary);
    color: #000;
    padding: 0.8rem 2rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 14px rgba(243, 211, 74, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary-v2:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 211, 74, 0.4);
}

.btn-primary-v2:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
}

/* --- Task Modal Redesign (V2) - DARK HEADER SPECIFIC --- */
.task-modal-v2 .modal-header {
    background: #15171e !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

#task-title {
    color: #ffffff !important;
}

#task-title::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#task-status {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2rem !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
}

#task-status option {
    background: #1e2125;
    color: #ffffff;
}

/* Priority Pills in Dark Header */
.priority-pill {
    background: transparent;
    opacity: 1 !important;
}

.priority-pill[data-priority="low"] {
    border: 1px solid #94a3b8;
    color: #94a3b8;
    background: transparent;
}

.priority-pill[data-priority="low"].active {
    background: #94a3b8 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.3);
}

.priority-pill[data-priority="medium"] {
    border: 1px solid #3b82f6;
    color: #3b82f6;
    background: transparent;
}

.priority-pill[data-priority="medium"].active {
    background: #3b82f6 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.priority-pill[data-priority="high"] {
    border: 1px solid #f97316;
    color: #f97316;
    background: transparent;
}

.priority-pill[data-priority="high"].active {
    background: #f97316 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.priority-pill[data-priority="urgent"] {
    border: 1px solid #ef4444;
    color: #ef4444;
    background: transparent;
}

.priority-pill[data-priority="urgent"].active {
    background: #ef4444 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Subtasks */
.subtask-item {
    background: #ffffff;
    border: 1px solid #f8f9fa;
    border-left: 3px solid transparent;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.subtask-item:hover {
    background: #fdfdfd;
    border: 1px solid #f1f3f5;
    border-left: 3px solid var(--accent-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

/* Collaborators Chips */
.collaborator-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #f1f3f5;
    padding: 0.25rem 0.5rem 0.25rem 0.25rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #12141d;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.collaborator-chip img,
.collaborator-chip .chip-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 0.6rem;
}

.collaborator-chip button {
    background: none;
    border: none;
    cursor: pointer;
    color: #adb5bd;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.collaborator-chip button:hover {
    color: #f06548;
}

/* Toggle Switch - Premium Design */
.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    flex-shrink: 0;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e2e8f0;
    transition: .3s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

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

.notif-item:hover {
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
}