:root {
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: #ffffff;
    --accent-color: #3b82f6;
    --font-main: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Workspace Selector */
.workspace-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    margin-right: 15px;
    position: relative;
    user-select: none;
}

.workspace-selector:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

.workspace-name {
    font-size: 0.9rem;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 220px;
    background: #111;
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
    flex-direction: column;
    padding: 8px;
    animation: fadeIn 0.2s ease-out;
}

.workspace-dropdown.active {
    display: flex;
}

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

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

.workspace-item {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 2px;
    color: rgba(255, 255, 255, 0.8);
}

.workspace-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.workspace-item.active {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-color);
    border-left: 3px solid var(--accent-color);
}

.workspace-item-info {
    display: flex;
    flex-direction: column;
}

.workspace-item-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.workspace-item-meta {
    font-size: 0.7rem;
    opacity: 0.6;
}

.add-workspace-btn {
    margin-top: 8px;
    padding: 10px;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    font-size: 0.85rem;
    color: var(--accent-color);
    cursor: pointer;
    transition: var(--transition);
}

.add-workspace-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    width: 100%;
    overflow: hidden;
    background: #000;
    display: flex;
    flex-direction: column;
}

#app-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.5s ease-in-out;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Header */
.top-bar {
    position: relative;
    z-index: 10;
    height: 50px;
    width: 100%;
    flex-shrink: 0;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid var(--glass-border);
}

.left-section {
    display: flex;
    align-items: center;
    height: 100%;
}

.atlas-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-right: 10px;
}

.atlas-logo svg {
    width: 24px;
    height: 24px;
}

.groups-container {
    display: flex;
    gap: 2px;
    height: 100%;
    overflow-x: auto;
    /* Allow scrolling if many groups */
    overflow-y: hidden;
    max-width: 60vw;
    /* Prevent it from taking too much space pushing right section */
    scrollbar-width: none;
    /* Hide scrollbar for cleaner look */
}

/* Hide scrollbar for Chrome/Safari/Opera */
.groups-container::-webkit-scrollbar {
    display: none;
}

.group-tab {
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    /* Slightly thicker for better visibility */
    opacity: 0.6;
    transition: var(--transition);
    user-select: none;
}

.group-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    opacity: 1;
}

.group-tab.active {
    opacity: 1;
    border-bottom-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

.right-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    background: transparent;
    border: none;
    color: white;
    padding: 6px;
    /* Adjusted */
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Main Content */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 5vh;
    /* Adjusted */
    padding-bottom: 40px;
    /* Space for grid padding */
    z-index: 5;
    position: relative;
    overflow-y: auto;
    /* Enable scrolling */
    overflow-x: hidden;
    /* Fix horizontal scroll */
}

/* Custom Scrollbar */
.content::-webkit-scrollbar {
    width: 8px;
}

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

.content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.search-container {
    width: 100%;
    max-width: 600px;
    margin-bottom: 5px;
}

.search-box {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.search-box:focus-within {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.search-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

#search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.1rem;
    outline: none;
}



/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 15vh;
    animation: fadeIn 0.2s ease;
}

.search-dropdown {
    margin-top: 15px;
    background: rgba(30, 30, 30, 0.95);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 60vh;
    overflow-y: auto;
    padding: 5px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    color: white;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.google-search-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 5px;
    padding-bottom: 12px;
}

.result-icon {
    font-size: 1.2rem;
    width: 30px;
    text-align: center;
}

.result-info {
    flex: 1;
}

.result-title {
    font-weight: 500;
    font-size: 0.95rem;
}

.result-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.search-overlay-content {
    width: 90%;
    max-width: 600px;
}

.glass-search {
    background: rgba(30, 30, 30, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
}

.close-search {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    margin-left: 8px;
    transition: color 0.2s;
}

.close-search:hover {
    color: white;
}

/* Shortcuts Grid */
.shortcuts-grid {
    display: grid;
    /* Fixed 4 columns as requested */
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 800px;
    /* Adjusted to fit 4 cols nicely */
    justify-content: center;
    padding: 20px;
}

.shortcut-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: white;
}

.shortcut-item:hover {
    transform: scale(1.05);
}

.shortcut-link,
.shortcut-link:visited,
.shortcut-link:hover,
.shortcut-link:active {
    color: white !important;
    text-decoration: none;
}

.shortcut-item .shortcut-actions {
    position: absolute;
    top: -5px;
    right: -5px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: var(--transition);
    z-index: 2;
}

.shortcut-item:hover .shortcut-actions {
    opacity: 1;
}

.action-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.action-btn.delete:hover {
    background: #ef4444;
    border-color: #ef4444;
}

.action-btn svg {
    width: 14px;
    height: 14px;
}

.icon-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    overflow: hidden;
}

.shortcut-item:hover .icon-wrapper {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.icon-wrapper img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.shortcut-name {
    color: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 500;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.9);
    opacity: 1;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 100%;
    line-height: 1.3;
    margin-top: 2px;
}

.add-shortcut-icon {
    font-size: 32px;
    color: white;
    font-weight: 300;
}

/* Footer */
.bottom-bar {
    height: 40px;
    width: 100%;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    font-size: 0.8rem;
    position: relative;
    z-index: 10;
}

.bottom-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Sort Select */
.sort-container {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.sort-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.sort-select:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sort-select:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
}

.sort-select option {
    background: #1e1e1e;
    color: white;
}

::selection {
    background: var(--accent-color);
    color: white;
}

/* Drag and Drop */
.shortcut-item.dragging {
    opacity: 0.4;
    transform: scale(0.9);
}

.shortcut-item.drag-over {
    border: 2px dashed var(--accent-color);
    border-radius: 16px;
}

.personalize-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.personalize-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.personalize-btn svg {
    width: 14px;
    height: 14px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

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

/* --- Toast Notifications --- */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10000;
}

.toast {
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    border-left: 4px solid var(--accent-color);
}

.toast.error {
    border-left: 4px solid #ff4444;
}

.toast.info {
    border-left: 4px solid #2196F3;
}


.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 500;
}

.close-modal {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: var(--transition);
}

.close-modal:hover {
    opacity: 1;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 8px;
    opacity: 0.8;
}

.form-group input,
.form-group-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px 12px;
    color: white;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.form-group-select option {
    background: #1e1e1e;
    color: white;
}

.form-group input:focus,
.form-group-select:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

.logo-preview-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.logo-preview {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-preview img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.logo-preview .placeholder-icon {
    font-size: 2.5rem;
    font-weight: 600;
    opacity: 0.5;
}

.icon-candidates-grid {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

.icon-candidate {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.icon-candidate:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.icon-candidate.selected {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color);
    background: rgba(255, 255, 255, 0.2);
}

.icon-candidate img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

.btn-primary:hover {
    filter: brightness(1.1);
}

.modal-content.alert {
    max-width: 320px;
    text-align: center;
}

#alert-modal,
#confirm-modal {
    z-index: 200;
}

.modal-content.alert .modal-body {
    padding: 30px 20px;
}

.modal-content.alert .modal-footer {
    justify-content: center;
    border-top: none;
    padding-top: 0;
}

.modal-tabs {
    display: flex;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 10px;
}

.modal-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 8px;
    opacity: 0.6;
    transition: var(--transition);
}

.modal-tab.active {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
    font-weight: 500;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .shortcuts-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 100px));
        gap: 20px;
    }

    .icon-wrapper {
        width: 54px;
        height: 54px;
    }
}

/* Sticky Notes */
#notes-view {
    animation: fadeIn 0.3s ease-out;
}

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

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

.note-item {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 200px;
    border-left: 5px solid var(--accent-color);
    cursor: pointer;
    overflow: hidden;
}

.note-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    opacity: 1;
    transition: var(--transition);
}

.note-item:hover .note-header {
    opacity: 1;
}

.note-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.note-content {
    flex: 1;
    color: white;
    font-size: 0.95rem;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    pointer-events: none;
    /* Evita que el click bloquee la nota */
}

.note-item.expanded .note-content {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    display: block;
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    opacity: 1.6;
}

.note-color-picker {
    display: flex;
    gap: 5px;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.color-dot:hover {
    transform: scale(1.3);
}

/* Note Drag and Drop */
.note-item.dragging {
    opacity: 0.4;
    transform: scale(0.95);
}

.note-item.drag-over {
    border: 2px dashed var(--accent-color);
    box-shadow: 0 0 20px var(--accent-color);
}

/* Splash Screen */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-in-out, visibility 0.5s;
}

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

.splash-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.splash-content h2 {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 2px;
    margin: 0;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.todo-item-container.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.todo-item-container.drag-over {
    border-color: var(--accent-color) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.delete-note,
.copy-note {
    opacity: 0;
    transition: var(--transition);
}

.note-item:hover .delete-note,
.note-item:hover .copy-note {
    opacity: 1;
}

/* Todo List Improvements */
.todo-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: translateX(5px);
}

#todo-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* File View Styles - Premium Edition */
#files-view {
    animation: slideUp 0.5s ease-out;
}

#drop-zone {
    padding: 20px;
    text-align: center;
    cursor: pointer;
    border: 2px dashed rgba(var(--accent-color-rgb), 0.2);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    transition: all 0.3s var(--transition);
}

#drop-zone:hover {
    background: rgba(var(--accent-color-rgb), 0.05);
    border-color: var(--accent-color);
}

#drop-zone.dragover {
    background: rgba(var(--accent-color-rgb), 0.05) !important;
    border-color: var(--accent-color) !important;
    transform: scale(1.01);
    box-shadow: 0 0 30px rgba(var(--accent-color-rgb), 0.1);
}

#drop-zone.dragover::before {
    opacity: 1;
}

.file-item {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
    animation: fadeIn 0.4s ease-out;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(5px);
    border-color: rgba(var(--accent-color-rgb), 0.3);
}

.file-icon-wrapper {
    width: 38px;
    height: 38px;
    background: rgba(var(--accent-color-rgb), 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.file-icon-wrapper svg {
    width: 22px;
    height: 22px;
}

.file-info {
    flex: 1;
    text-align: left;
    min-width: 0;
    /* Important for ellipsis */
}

.file-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #fff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.file-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
}

.file-actions {
    display: flex;
    gap: 8px;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.file-item:hover .file-actions {
    opacity: 1;
}

.file-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    text-decoration: none;
}

.file-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.file-btn-download:hover {
    background: rgba(var(--accent-color-rgb), 0.2);
    border-color: var(--accent-color);
}

.file-btn-delete:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #ef4444;
}

/* Modal and global animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

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

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

/* Additional Premium Refinements */
.drop-icon-svg {
    opacity: 0.3;
    margin-bottom: 10px;
    color: var(--accent-color);
    transition: transform 0.3s;
    width: 32px !important;
    height: 32px !important;
}

#drop-zone:hover .drop-icon-svg {
    transform: translateY(-3px);
    opacity: 0.8;
}

#drop-zone p {
    font-size: 0.85rem !important;
    margin: 0 !important;
    color: white;
}

#files-list {
    perspective: 1000px;
}

/* Task Action Buttons */
.reminder-todo-btn,
.copy-todo-btn,
.delete-todo-btn {
    transition: all 0.2s ease;
}

.reminder-todo-btn:hover,
.copy-todo-btn:hover,
.delete-todo-btn:hover {
    transform: scale(1.1);
    opacity: 1 !important;
}

.reminder-todo-btn:hover {
    color: var(--accent-color) !important;
    text-shadow: 0 0 10px var(--accent-color);
}

.action-btn.key-btn:hover {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

#cred-menu button:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.copy-input-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

.copy-input-btn:active {
    transform: scale(0.95);
}

/* User Profile Styles */
.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 15px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.15);
}

.user-avatar {
    width: 28px;
    height: 28px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.user-email {
    font-size: 0.9rem;
    opacity: 0.9;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: none;
    /* Hidden on mobile usually */
}

@media (min-width: 768px) {
    .user-email {
        display: block;
    }
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    /* Reduced gap */
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 5px;
    display: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    min-width: 160px;
    animation: fadeIn 0.2s ease;
}

/* Invisible bridge to keep hover active */
.profile-dropdown::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
}

.user-profile:hover .profile-dropdown {
    display: block;
}

.profile-dropdown button {
    width: 100%;
    background: transparent;
    border: none;
    color: #ef4444;
    /* Red color for logout */
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-dropdown button:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Kanban Styles */
#projects-view {
    animation: fadeIn 0.5s ease;
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-card:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.project-card h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

.project-progress-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--accent-color);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    cursor: pointer;
}

.toast.hide {
    animation: toastFadeOut 0.3s forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

/* Date & Time Widget */
.datetime-widget-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.time-display {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    letter-spacing: -2px;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.date-display {
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    text-transform: capitalize;
    margin-top: 5px;
}

@keyframes toastFadeOut {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* DAILY QUOTE (Minimalist - Below Search) */
/* DAILY QUOTE (Minimalist - Below Search) */
/* DAILY QUOTE (Minimalist - Below Search) */
.quote-banner-minimal {
    width: 100%;
    /* Match the search input max-width/sizing */
    max-width: 600px;
    text-align: center;
    padding: 10px 20px;
    margin: 8px auto 0;
    /* Lighter background */
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    /* Allow text to wrap if needed, although we want single line pref */
    /* User asked for "full phrase", implied maybe it was cutting off? */
    /* Let's ensure flex doesn't shrink it too much */
    flex-wrap: wrap;
}

.quote-text-minimal {
    margin: 0;
    font-style: italic;
    font-weight: 400;
}

.quote-author-minimal {
    display: none;
    /* Hide author */
}

.quote-author-minimal::before {
    content: '';
}

@media (max-width: 768px) {
    .quote-banner-minimal {
        padding: 10px 16px;
        flex-direction: column;
        gap: 4px;
        border-radius: 16px;
    }

    .quote-author-minimal::before {
        content: '';
    }
}


/* DASHBOARD LAYOUT */
.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(400px, 1fr) minmax(240px, 280px);
    gap: 20px;
    width: 98%;
    max-width: 1600px;
    margin-top: 20px;
    align-items: start;
}

.dashboard-left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.dashboard-center-column {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    gap: 30px;
}

.dashboard-widget {
    background: rgba(30, 30, 30, 0.4);
    /* Darker glass for contrast */
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 80vh;
    animation: fadeIn 0.5s ease;
}

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

.widget-header h3 {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.9;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.icon-btn-small {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn-small:hover {
    background: var(--accent-color);
}

/* Widget List Container */
.widget-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    max-height: 400px;
    padding-right: 5px;
    /* Space for scrollbar */
}

/* Widget Items */
.widget-todo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    transition: background 0.2s;
    width: 100%;
    /* Ensure full width */
    box-sizing: border-box;
    /* Include padding in width */
}

.widget-todo-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.widget-todo-check {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

.widget-todo-check.checked {
    background: var(--accent-color);
    border-color: var(--accent-color);
    position: relative;
}

.widget-note-item {
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    overflow: hidden;
    /* Fix horizontal scroll */
    width: 100%;
    /* Ensure full width */
    box-sizing: border-box;
    /* Include padding in width */
}

.widget-note-item:hover {
    background: rgba(255, 255, 255, 0.08);
    /* Removed transform to prevent scroll issues */
}

.widget-note-title {
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.widget-note-preview {
    font-size: 0.8rem;
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.widget-note-date {
    font-size: 0.7rem;
    opacity: 0.4;
    margin-top: 5px;
    display: block;
    text-align: right;
}

/* Media query removed to avoid conflict with responsive.css */
        order: 1;
    }

    .left-widget {
        order: 2;
    }

    .right-widget {
        order: 3;
    }
}

.project-progress-bar {
    height: 100%;
    background: var(--accent-color);
    width: 0%;
    transition: width 0.5s ease;
}

.kanban-board {
    display: flex;
    gap: 20px;
    padding: 10px 0;
    min-height: 100%;
    align-items: flex-start;
}

.add-column-btn {
    min-width: 280px;
    height: 50px;
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.add-column-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.kanban-column {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    min-width: 280px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    max-height: 100%;
}

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

.kanban-column-title {
    font-weight: 500;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.kanban-tasks-list {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    flex-grow: 1;
    min-height: 100px;
}

.kanban-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px;
    cursor: grab;
    transition: all 0.2s ease;
}

.kanban-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card.dragging {
    opacity: 0.4;
    transform: scale(0.95);
}

.kanban-tasks-list.drag-over {
    background: rgba(var(--accent-color-rgb), 0.05);
    outline: 2px dashed var(--accent-color);
    outline-offset: -2px;
}

.add-task-inline {
    width: 100%;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 10px;
    text-align: left;
    cursor: pointer;
    border-radius: 0 0 16px 16px;
}

.add-task-inline:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.add-column-btn {
    min-width: 250px;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 2px dashed rgba(255, 255, 255, 0.1) !important;
    height: 100px;
    border-radius: 12px;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.add-column-btn:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--accent-color) !important;
    color: var(--accent-color);
}

/* Background Gallery */
.bg-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 5px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.bg-item {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.bg-item:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.bg-item.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

.bg-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bg-delete-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(239, 68, 68, 0.8);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 2px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.bg-item:hover .bg-delete-btn {
    opacity: 1;
}

/* PROJECT HUB STYLES */
.hub-tab {
    padding: 8px 20px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.hub-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.hub-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    font-weight: 500;
}

.hub-content {
    animation: fadeIn 0.3s ease;
}

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

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

.resources-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

@media (min-width: 900px) {
    .resources-container {
        flex-direction: row;
        gap: 30px;
        align-items: flex-start;
    }

    .resources-column {
        flex: 1;
        min-width: 0;
    }
}

.resources-list {
    min-height: 100px;
    margin-top: 15px;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.2s;
    text-decoration: none;
    color: white;
}

.resource-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(var(--accent-color-rgb), 0.3);
}

.resource-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 1.2rem;
}

.resource-info {
    flex: 1;
    min-width: 0;
}

.resource-title {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resource-url {
    font-size: 0.75rem;
    opacity: 0.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drop-zone-small:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: var(--accent-color) !important;
}

.delete-resource-btn {
    opacity: 0;
    transition: opacity 0.2s;
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resource-item:hover .delete-resource-btn {
    opacity: 1;
}

#project-notes-editor:focus {
    background: rgba(0, 0, 0, 0.3) !important;
    border-color: var(--accent-color) !important;
    outline: none;
}

/* PROJECT STICKY NOTES */
/* PROJECT NOTES (Dashboard Style) */
.sticky-note {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
    border-left: 5px solid var(--accent-color);
    cursor: default;
    overflow: hidden;
}

.sticky-note:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.sticky-note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.sticky-note-title-input {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    width: 100%;
    outline: none;
    padding: 0;
}

.sticky-note-content {
    flex: 1;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.5;
    background: transparent;
    border: none;
    resize: none;
    outline: none;
    padding: 0;
}

.sticky-note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    opacity: 0.5;
    color: white;
    margin-top: auto;
}

.delete-note-btn,

.delete-note-btn {
    color: #ef4444;
}

.sticky-note:hover .delete-note-btn,

.sticky-note.dragging {
    opacity: 0.5;
    transform: scale(0.95);
    border-style: dashed;
}

.sticky-note.drag-over {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color);
}



.action-btn.copy-note:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background: rgba(59, 130, 246, 0.1);
}

/* File Cloud Tabs */
.file-tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 10px 0;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.file-tab:hover {
    color: white;
}

.file-tab.active {
    color: var(--accent-color);
}

.file-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
}

/* Share Widget */
.drop-zone-mini {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.01);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 60px;
}

.drop-zone-mini:hover {
    border-color: var(--accent-color) !important;
    background: rgba(59, 130, 246, 0.05) !important;
}

.drop-zone-mini.drag-over {
    border-color: var(--accent-color) !important;
    background: rgba(59, 130, 246, 0.1) !important;
}

.share-widget {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

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

/* READ ONLY MODE */
body.readonly-mode .delete-btn,
body.readonly-mode .edit-btn,
body.readonly-mode .delete-col,
body.readonly-mode .add-task-inline,
body.readonly-mode .file-btn-delete,
body.readonly-mode .close-modal,
/* Wait, modal close should work */
body.readonly-mode .icon-btn-delete,
body.readonly-mode #create-workspace-btn,
body.readonly-mode .add-tab-btn,
body.readonly-mode .add-workspace-btn {
    display: none !important;
}

body.readonly-mode .kanban-card {
    cursor: default;
}

/* Disable drag and drop in readonly */
body.readonly-mode .kanban-card,
body.readonly-mode .note-item {
    pointer-events: none;
    /* Disables clicking too? Yes. Need to allow clicking to read? */
}

body.readonly-mode .kanban-card {
    pointer-events: auto;
    /* Re-enable for clicking to view details */
}

body.readonly-mode input[type="text"]:not(#search-input),
body.readonly-mode textarea {
    pointer-events: none;
    background: rgba(255, 255, 255, 0.05);
}

/* =========================================
   READ-ONLY MODE STYLES
   ========================================= */
body.readonly-mode .delete-btn,
body.readonly-mode .edit-btn,
body.readonly-mode .delete-col,
body.readonly-mode .add-task-inline,
body.readonly-mode .file-btn-delete,
body.readonly-mode .file-btn-delete-perm,
body.readonly-mode .file-btn-restore,
body.readonly-mode .remove-member-btn,
body.readonly-mode .delete-note,
body.readonly-mode .delete-todo-btn,
body.readonly-mode .add-column-btn,
body.readonly-mode #add-note-btn,
body.readonly-mode #widget-add-note-btn,
body.readonly-mode #add-todo-btn,
body.readonly-mode #add-project-btn,
body.readonly-mode #add-column-btn,
body.readonly-mode #add-resource-link-btn,
body.readonly-mode #dropzone-widget,
body.readonly-mode #project-files-dropzone,
body.readonly-mode #share-invite-actions,
body.readonly-mode #trash-toggle-btn,
body.readonly-mode #delete-all-files-btn,
body.readonly-mode #empty-trash-btn,
body.readonly-mode #save-kanban-task-btn,
body.readonly-mode #delete-kanban-task-btn,
body.readonly-mode .icon-btn.delete {
    display: none !important;
}

/* Disable editing triggers */
body.readonly-mode .todo-text,
body.readonly-mode .note-item {
    cursor: default !important;
}

body.readonly-mode .todo-text {
    pointer-events: none;
}

/* Read-Only Modal States */
body.readonly-mode #save-note-btn,
body.readonly-mode #note-modal-color-picker {
    display: none !important;
}

body.readonly-mode #note-input-title,
body.readonly-mode #note-input-text {
    pointer-events: none;
    border-color: transparent;
    background: transparent;
}

/* Project & Kanban Read-Only Extensions */
body.readonly-mode .edit-proj,
body.readonly-mode .delete-proj,
body.readonly-mode .delete-col,
body.readonly-mode .add-task-inline,
body.readonly-mode #add-column-btn,
body.readonly-mode #add-project-note-btn,
body.readonly-mode .delete-note-btn,
body.readonly-mode .add-resource-link-btn {
    display: none !important;
}

/* Disable inputs in Project Notes */
body.readonly-mode .sticky-note-title-input,
body.readonly-mode .sticky-note-content {
    pointer-events: none;
    border-color: transparent;
}

/* Disable Drag & Drop for Viewers */
body.readonly-mode [draggable="true"] {
    pointer-events: none;
    cursor: default;
}

/* Kanban Modal Read-Only */
body.readonly-mode #save-kanban-task-btn,
body.readonly-mode #save-project-btn {
    display: none !important;
}

body.readonly-mode #kanban-task-input,
body.readonly-mode #project-name-input,
body.readonly-mode #project-desc-input,
body.readonly-mode #project-date-input,
body.readonly-mode #project-modal-color-picker {
    pointer-events: none;
    opacity: 0.6;
}

/* Hide Project Resource Actions for Viewers */
body.readonly-mode .delete-resource-btn,
body.readonly-mode .edit-resource-btn {
    display: none !important;
}

/* Hide Chat Deletion/Management for Viewers */
body.readonly-mode .delete-session-btn,
body.readonly-mode #clear-chat-btn,
body.readonly-mode #chat-settings-btn,
body.readonly-mode #chat-config-btn {
    display: none !important;
}

/* Ensure Copy Buttons are Visible (Explicitly) */
body.readonly-mode .copy-note,
body.readonly-mode .copy-todo-btn {
    display: inline-flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Hide New Chat Button for Viewers */
body.readonly-mode #new-chat-btn {
    display: none !important;
}

/* Focus Mode / Zen Mode */
body.focus-mode-active .top-bar,
body.focus-mode-active .bottom-bar,
body.focus-mode-active .workspace-selector,
body.focus-mode-active .add-workspace-btn {
    display: none !important;
}

body.focus-mode-active #app-bg {
    filter: brightness(0.2);
}

body.focus-mode-active .background-overlay {
    background: rgba(0, 0, 0, 0.85);
}

body.focus-mode-active #notes-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    z-index: 2000;
    /* Above everything */
    padding: 40px;
    background: transparent;
    overflow-y: auto;
    display: block !important;
    /* Ensure it shows */
}

body.focus-mode-active #notes-grid {
    max-width: 1400px;
    margin: 0 auto;
}

body.focus-mode-active .search-container {
    display: none;
}

/* --- TASKS MODULE --- */
.todo-view-container {
    display: none;
    width: 90%;
    max-width: 800px;
    padding: 20px;
}

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

.todo-header h2 {
    font-size: 1.5rem;
    font-weight: 500;
}

.todo-input-container {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 600px;
    margin-left: 20px;
}

.todo-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--accent-color);
    padding: 12px 20px;
    border-radius: 12px;
    color: white;
    outline: none;
    font-size: 1rem;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
    transition: all 0.3s;
}

.todo-input:focus {
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.add-todo-btn {
    padding: 0 25px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transition: var(--transition);
}

.add-todo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.todo-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.todo-item-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

.todo-item-container:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

.todo-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-color);
}

.todo-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.todo-text {
    transition: all 0.3s;
    cursor: pointer;
}

.todo-text.completed {
    text-decoration: line-through;
    opacity: 0.5;
}

.todo-meta {
    display: flex;
    gap: 8px;
    font-size: 0.7rem;
    opacity: 0.4;
    margin-top: 2px;
}

.todo-actions {
    display: flex;
    gap: 8px;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.todo-item-container:hover .todo-actions {
    opacity: 1;
}

.todo-action-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.todo-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.todo-action-btn.delete {
    color: #ef4444;
}

.todo-action-btn.reminder-active {
    color: #facc15;
}

.edit-todo-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--accent-color);
    padding: 5px 12px;
    border-radius: 8px;
    color: white;
    outline: none;
    font-size: 0.95rem;
}

.save-edit-btn {
    background: transparent;
    border: none;
    color: #10b981;
    cursor: pointer;
    padding: 4px;
}

.todo-checkbox:disabled {
    opacity: 0.3;
}

.reminder-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 10000;
    transform: translate(-50%, -50%);
    background: #222;
    color: #fff;
    padding: 10px;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
}

.reminder-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
}

/* =========================================
   Professional File Manager Styles
   ========================================= */

/* Main Container */
.files-view-container {
    width: 95%;
    max-width: 1400px;
    height: calc(100vh - 120px);
    margin: 0 auto;
    padding: 20px 0;
    overflow: hidden;
    /* Manage scroll internally */
}

.files-view-layout {
    display: flex;
    gap: 30px;
    height: 100%;
    align-items: stretch;
}

/* Sidebar */
.files-sidebar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Main Content Area */
.files-main-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

/* Tabs */
.files-header-tabs {
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.files-tabs-group {
    display: flex;
    gap: 20px;
}

.file-tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    padding: 8px 12px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.file-tab:hover {
    color: white;
}

.file-tab.active {
    color: var(--accent-color);
}

.file-tab.active::after {
    content: '';
    position: absolute;
    bottom: -16px;
    /* Align with border-bottom of container */
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-color);
    border-radius: 3px 3px 0 0;
}

.badge-count {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 5px;
}

/* Toolbar */
.files-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 20px;
    flex-shrink: 0;
}

.files-info h2 {
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0;
}

.files-info span {
    font-size: 0.85rem;
    opacity: 0.5;
}

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

/* Search Box */
.files-search-box {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 6px 12px;
    gap: 8px;
    width: 250px;
    transition: var(--transition);
}

.files-search-box:focus-within {
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.4);
}

.files-search-box input {
    background: transparent;
    border: none;
    color: white;
    width: 100%;
    outline: none;
    font-size: 0.9rem;
}

.files-search-box svg {
    opacity: 0.5;
}

/* Sort Select */
.files-sort-wrapper {
    position: relative;
}

.files-sort-select {
    appearance: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 8px 32px 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%20viewBox%3D%220%200%20292.4%20292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right .7em top 50%;
    background-size: .65em auto;
}

.files-sort-select:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.files-sort-select option {
    background: #1e1e1e;
}

/* View Toggle */
.files-view-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 2px;
    border: 1px solid var(--glass-border);
}

.view-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 6px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.view-btn:hover {
    color: white;
}

.view-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

.view-btn svg {
    width: 20px;
    height: 20px;
}

/* File Grid/List Area */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    overflow-y: auto;
    padding-right: 5px;
    /* Space for scrollbar */
    flex: 1;
    /* Take remaining space */
}

/* Layout: List View Override */
.files-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* File Item Styling */
/* File Item Styling */
.file-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Center content vertically */
    gap: 8px;
    /* Reduce gap */
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 140px;
    /* Force fixed height for grid cards */
    width: 100%;
}

.files-grid.list-view .file-item {
    flex-direction: row;
    padding: 10px 15px;
    align-items: center;
    gap: 20px;
    height: 56px;
    /* Fixed height for list rows */
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.08);
    /* Slightly lighter on hover */
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.files-grid.list-view .file-item:hover {
    transform: none;
    /* No lift in list view */
    transform: translateX(4px);
    /* Slight slide right */
}

/* File Icon */
.file-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.files-grid.list-view .file-icon-wrapper {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
}

.file-icon-wrapper svg {
    width: 28px;
    height: 28px;
}

/* File Info */
.file-info {
    text-align: center;
    width: 100%;
    overflow: hidden;
}

.files-grid.list-view .file-info {
    text-align: left;
    flex: 1;
    /* Take available width in list view */
    display: flex;
    /* Allow meta to be side-by-side or stacked */
    align-items: center;
    justify-content: space-between;
}

.file-name {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.files-grid.list-view .file-name {
    margin-bottom: 0;
    max-width: 40%;
}

.file-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* File Actions (Buttons) */
.file-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    /* Hidden by default */
    transition: var(--transition);
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    padding: 4px;
    border-radius: 6px;
}

.files-grid.list-view .file-actions {
    position: static;
    /* In flow for list view */
    background: transparent;
    opacity: 1;
    /* Always visible in list view */
    margin-left: auto;
    /* Push to right */
    backdrop-filter: none;
    padding: 0;
}

.file-item:hover .file-actions,
.file-item:focus-within .file-actions {
    opacity: 1;
}

/* Buttons inside file actions */
.file-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid var(--glass-border);
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    width: 28px;
    height: 28px;
}

.file-btn:hover {
    background: white;
    color: black;
}

.file-btn.danger:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

/* Utility: Danger Button Override for Global Actions */
.files-global-actions .file-btn.danger {
    width: auto;
    padding: 0 12px;
    height: 32px;
    font-size: 0.85rem;
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
}

.files-global-actions .file-btn.danger:hover {
    background: #ef4444;
    color: white;
}

/* Grid Fixes */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    align-items: start;
    /* Prevent stretching height */
}

/* Ensure note items don't stretch */
.note-item {
    height: auto;
    max-height: 250px;
    /* Safety cap */
    display: flex;
    flex-direction: column;
}