/** Main dashboard styling **/

/* =============================================
   THEME SYSTEM
   13 color themes × 2 modes (light/dark)
   Default: Mauve + Dark mode

   The palette definitions themselves are in palettes.css, which the public
   frontend loads as well, so the palette a person chooses applies to every
   page rather than only to the account area. Load palettes.css before this
   file. Everything below reads those variables.
   ============================================= */

/* Shared layout variables, which describe the dashboard rather than any
   palette, so they stay here. */
:root {
    --sp-sidebar-width: 70px;
    --sp-header-height: 65px;
    --sp-toolbar-height: 50px;
}

/* =============================================
   THEME SELECTOR MODAL STYLES
   ============================================= */
.sp-theme-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 80px 20px 20px;
    pointer-events: none;
}
.sp-theme-modal-overlay.open {
    display: flex;
    pointer-events: auto;
}
.sp-theme-modal {
    background: var(--sp-bg-secondary);
    border-radius: 12px;
    padding: 20px;
    width: 380px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--sp-border-color);
    pointer-events: auto;
}
.sp-theme-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--sp-border-color);
}
.sp-theme-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--sp-text-primary);
    margin: 0;
}
.sp-theme-modal-close {
    background: none;
    border: none;
    color: var(--sp-text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s;
}
.sp-theme-modal-close:hover {
    color: var(--sp-text-primary);
}

/* Mode toggle (light/dark) */
.sp-mode-toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 10px 12px;
    background: var(--sp-bg-card);
    border-radius: 8px;
}
.sp-mode-toggle-label {
    font-size: 13px;
    color: var(--sp-text-secondary);
}
.sp-mode-toggle {
    display: flex;
    background: var(--sp-bg-primary);
    border-radius: 6px;
    padding: 3px;
}
.sp-mode-btn {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    background: transparent;
    color: var(--sp-text-muted);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}
.sp-mode-btn.active {
    background: var(--sp-accent-primary);
    color: #fff;
}
.sp-mode-btn:hover:not(.active) {
    color: var(--sp-text-primary);
}

/* Theme grid */
.sp-theme-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.sp-theme-card {
    position: relative;
    background: var(--sp-bg-card);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.sp-theme-card:hover {
    background: var(--sp-bg-card-hover);
    transform: translateY(-1px);
}
.sp-theme-card.active {
    border-color: var(--sp-accent-primary);
}
.sp-theme-card-preview {
    display: flex;
    gap: 3px;
    height: 32px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
.sp-theme-card-swatch {
    flex: 1;
}
.sp-theme-card-name {
    font-size: 11px;
    font-weight: 500;
    color: var(--sp-text-primary);
    text-align: center;
}
.sp-theme-card-check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 16px;
    height: 16px;
    background: var(--sp-accent-primary);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
}
.sp-theme-card.active .sp-theme-card-check {
    display: flex;
}

/* Theme swatch color classes */
.swatch-mauve-1 { background: #1a1625; }
.swatch-mauve-2 { background: #3d2b4a; }
.swatch-mauve-3 { background: #c75b7a; }
.swatch-mauve-4 { background: #8b5a9e; }

.swatch-dusty-1 { background: #151a22; }
.swatch-dusty-2 { background: #2a3a4d; }
.swatch-dusty-3 { background: #5a8fd4; }
.swatch-dusty-4 { background: #6bb3c7; }

.swatch-sage-1 { background: #161a18; }
.swatch-sage-2 { background: #2a3d35; }
.swatch-sage-3 { background: #6b9e7a; }
.swatch-sage-4 { background: #7ab88a; }

.swatch-rose-1 { background: #1a1618; }
.swatch-rose-2 { background: #4a3540; }
.swatch-rose-3 { background: #c78a9e; }
.swatch-rose-4 { background: #d4a0b0; }

.swatch-slate-1 { background: #16181a; }
.swatch-slate-2 { background: #2d3640; }
.swatch-slate-3 { background: #7a8ea0; }
.swatch-slate-4 { background: #8aa0b4; }

.swatch-sand-1 { background: #1a1816; }
.swatch-sand-2 { background: #4a4235; }
.swatch-sand-3 { background: #c7a87a; }
.swatch-sand-4 { background: #d4b88a; }

.swatch-plum-1 { background: #18151a; }
.swatch-plum-2 { background: #3d2d48; }
.swatch-plum-3 { background: #9a7ab8; }
.swatch-plum-4 { background: #b08ac8; }

.swatch-teal-1 { background: #151a1a; }
.swatch-teal-2 { background: #2a4045; }
.swatch-teal-3 { background: #5a9e9e; }
.swatch-teal-4 { background: #6bb8b8; }

.swatch-wine-1 { background: #1a1516; }
.swatch-wine-2 { background: #4d2d35; }
.swatch-wine-3 { background: #a85a6a; }
.swatch-wine-4 { background: #c06a7a; }

.swatch-olive-1 { background: #181a16; }
.swatch-olive-2 { background: #3d4030; }
.swatch-olive-3 { background: #8a9e6a; }
.swatch-olive-4 { background: #9ab87a; }

.swatch-charcoal-1 { background: #1a1a1a; }
.swatch-charcoal-2 { background: #2d2d2d; }
.swatch-charcoal-3 { background: #5a9fd4; }
.swatch-charcoal-4 { background: #6b8cce; }

.swatch-midnight-1 { background: #000000; }
.swatch-midnight-2 { background: #0f0f0f; }
.swatch-midnight-3 { background: #bb86fc; }
.swatch-midnight-4 { background: #03dac6; }

/* Base reset for dashboard */
.sp-dashboard {
    background-color: var(--sp-bg-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ====================== */
/* HEADER STYLES          */
/* ====================== */
.sp-header {
    background-color: var(--sp-bg-header);
    height: var(--sp-header-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--sp-border-color);
}

.sp-header-logo {
    display: flex;
    align-items: center;
    margin-right: 30px;
}

.sp-header-logo img {
    height: 36px;
    width: auto;
}

.sp-header-nav {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.sp-header-nav-item {
    margin: 0 8px;
}

.sp-header-nav-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    color: var(--sp-text-header);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.sp-header-nav-item a:hover, .sp-header-nav-item.active a {
    opacity: 1;
}

.sp-header-nav-item a i {
    font-size: 22px;
    margin-bottom: 4px;
    /* Premium is the only item drawn from FontAwesome; the rest come from
       entypo. The two fonts have different ascent and descent, so the glyph
       box under Premium was a different height from the others and its label
       started at a different line. A fixed box for every icon takes the font's
       own metrics out of the layout, which is what puts the five labels on one
       baseline. */
    display: block;
    height: 26px;
    line-height: 26px;
    text-align: center;
}

.sp-header-nav-item a span {
    font-size: 11px;
    text-transform: capitalize;
}

.sp-header-right {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.sp-header-right > * {
    margin-left: 15px;
}

/* Theme toggle button */
.sp-theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: var(--sp-text-header);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sp-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.sp-theme-toggle i {
    font-size: 14px;
    opacity: 0.8;
}

.sp-theme-current {
    font-weight: 500;
}

.sp-notification-btn {
    background: none;
    border: none;
    color: var(--sp-text-header);
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    position: relative;
    padding: 8px;
}

.sp-notification-btn:hover {
    opacity: 1;
}

.sp-notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--sp-accent-secondary);
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.sp-admin-badge {
    background: var(--sp-accent-red);
    color: #fff;
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sp-user-dropdown {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--sp-text-header);
}

.sp-user-dropdown-name {
    margin-right: 8px;
    font-size: 14px;
}

.sp-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

/* ====================== */
/* SIDEBAR STYLES         */
/* ====================== */
.sp-sidebar {
    position: fixed;
    top: var(--sp-header-height);
    left: 0;
    bottom: 0;
    width: var(--sp-sidebar-width);
    background-color: var(--sp-bg-sidebar);
    z-index: 900;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--sp-border-sidebar);
}

/* Light theme sidebar has subtle right border */
:root .sp-sidebar {
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

/* Dark theme sidebar border */
[data-theme="dark"] .sp-sidebar {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sp-sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 10px 0;
    flex: 1;
}

.sp-sidebar-item {
    position: relative;
    margin: 4px 0;
}

.sp-sidebar-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    color: var(--sp-text-sidebar);
    text-decoration: none;
    transition: all 0.2s ease;
}

.sp-sidebar-item a:hover {
    color: var(--sp-text-sidebar-active);
}

.sp-sidebar-item.active a {
    color: var(--sp-text-sidebar-active);
}

.sp-sidebar-item a i {
    font-size: 22px;
}

/* Sidebar icon circle hover effect */
.sp-sidebar-item a:hover i {
    opacity: 1;
}

/* Sidebar tooltip styling - pill shape with accent color */
.sp-sidebar-tooltip {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--sp-tooltip-bg);
    color: var(--sp-tooltip-text);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-left: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sp-sidebar-item:hover .sp-sidebar-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Sidebar submenu (flyout) */
.sp-sidebar-submenu {
    position: absolute;
    left: 100%;
    top: 0;
    background-color: var(--sp-bg-secondary);
    min-width: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-left: 10px;
    z-index: 1001;
    padding: 10px 0;
}

.sp-sidebar-item.has-submenu:hover .sp-sidebar-submenu {
    opacity: 1;
    visibility: visible;
}

.sp-sidebar-submenu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--sp-text-secondary);
    justify-content: flex-start;
}

.sp-sidebar-submenu a:hover {
    background-color: var(--sp-bg-card);
}

.sp-sidebar-submenu a i {
    margin-right: 12px;
    font-size: 18px;
    width: 24px;
}

.sp-sidebar-submenu a span {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sidebar storage status */
.sp-sidebar-storage {
    padding: 15px 10px;
    border-top: 1px solid var(--sp-border-color);
    margin-top: auto;
}

.sp-storage-info {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    flex-direction: column;
    text-align: center;
}

.sp-storage-icon {
    font-size: 18px;
    color: var(--sp-text-muted);
    margin-bottom: 6px;
}

.sp-storage-text {
    font-size: 10px;
    color: var(--sp-text-muted);
    line-height: 1.3;
    word-break: break-word;
}

.sp-storage-progress {
    height: 4px;
    background-color: var(--sp-border-color);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
    width: 100%;
}

.sp-storage-progress-bar {
    height: 100%;
    background-color: var(--sp-accent-green);
    border-radius: 2px;
    transition: width 0.3s ease;
    min-width: 2px;
}

/* ====================== */
/* MAIN CONTENT AREA      */
/* ====================== */
.sp-main {
    margin-left: var(--sp-sidebar-width);
    margin-top: var(--sp-header-height);
    min-height: calc(100vh - var(--sp-header-height));
    display: flex;
    flex-direction: column;
}

/* ====================== */
/* TOOLBAR STYLES         */
/* ====================== */
.sp-toolbar {
    background-color: var(--sp-bg-toolbar);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--sp-border-color);
    position: sticky;
    top: var(--sp-header-height);
    z-index: 100;
}

.sp-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sp-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Toolbar buttons */
.sp-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.sp-btn i {
    margin-left: 6px;
}

.sp-btn-upload {
    background-color: var(--sp-btn-upload-bg);
    color: #fff;
}

.sp-btn-upload:hover {
    opacity: 0.9;
    color: #fff;
}

.sp-btn-secondary {
    background-color: var(--sp-btn-search-bg);
    color: #fff;
}

.sp-btn-secondary:hover {
    opacity: 0.9;
    color: #fff;
}

.sp-btn-accent {
    background-color: var(--sp-btn-accent-bg);
    color: #fff;
}

.sp-btn-accent:hover {
    opacity: 0.9;
    color: #fff;
}

.sp-btn-text {
    background: none;
    color: var(--sp-text-secondary);
    padding: 8px 12px;
    border: none;
}

.sp-btn-text:hover {
    color: var(--sp-text-primary);
    background: none;
}

.sp-btn-text i {
    margin-left: 4px;
}

/* Toolbar action buttons - Links, Delete styled as plain text */
.sp-toolbar-right .viewFileLinks .sp-btn-text {
    color: var(--sp-text-secondary);
    font-weight: 400;
}

.sp-toolbar-right .viewFileLinks .sp-btn-text:hover:not(.disabled) {
    color: var(--sp-text-primary);
}

/* Dropdown styles */
.sp-dropdown {
    position: relative;
    display: inline-block;
}

.sp-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--sp-bg-secondary);
    min-width: 180px;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    margin-top: 5px;
    padding: 8px 0;
}

.sp-dropdown:hover .sp-dropdown-menu, .sp-dropdown.open .sp-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.sp-dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--sp-text-secondary);
    text-decoration: none;
    font-size: 13px;
}

.sp-dropdown-menu a:hover {
    background-color: var(--sp-bg-card);
    color: var(--sp-text-primary);
}

.sp-dropdown-menu a i {
    margin-right: 10px;
    width: 18px;
    text-align: center;
}

.sp-dropdown-divider {
    height: 1px;
    background-color: var(--sp-border-color);
    margin: 8px 0;
}

/* ====================== */
/* FILES CONTENT AREA     */
/* ====================== */
.sp-content {
    flex: 1;
    padding: 20px;
    background-color: var(--sp-bg-primary);
}

.sp-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

/* File card styles */
.sp-file-card {
    background-color: var(--sp-bg-card);
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.sp-file-card:hover {
    background-color: var(--sp-bg-card-hover);
    box-shadow: var(--sp-shadow-card);
}

.sp-file-card.selected {
    border-color: var(--sp-accent-primary);
    background-color: var(--sp-bg-card-hover);
}

.sp-file-card-thumb {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    background-color: var(--sp-bg-secondary);
    border-radius: 6px;
    overflow: hidden;
}

.sp-file-card-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sp-file-card-thumb .sp-file-icon {
    font-size: 48px;
    color: var(--sp-text-muted);
}

.sp-file-card-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--sp-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.sp-file-card-size {
    font-size: 11px;
    color: var(--sp-text-muted);
}

/* Folder card styles */
.sp-folder-card {
    background-color: var(--sp-bg-card);
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.sp-folder-card:hover {
    background-color: var(--sp-bg-card-hover);
}

.sp-folder-card-icon {
    font-size: 32px;
    color: var(--sp-accent-primary);
    margin-right: 12px;
}

.sp-folder-card-info {
    flex: 1;
    min-width: 0;
}

.sp-folder-card-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--sp-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-folder-card-count {
    font-size: 12px;
    color: var(--sp-text-muted);
}

/* Pagination */
.sp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 5px;
}

.sp-pagination-btn {
    padding: 8px 14px;
    border: 1px solid var(--sp-border-color);
    background-color: var(--sp-bg-secondary);
    color: var(--sp-text-secondary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.sp-pagination-btn:hover {
    background-color: var(--sp-bg-card);
}

.sp-pagination-btn.active {
    background-color: var(--sp-accent-primary);
    border-color: var(--sp-accent-primary);
    color: #fff;
}

.sp-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ====================== */
/* FOOTER STYLES          */
/* ====================== */
.sp-footer {
    background-color: var(--sp-bg-secondary);
    padding: 30px 20px;
    margin-top: auto;
}

/* One colour, not two. A gradient between the primary and the secondary accent
   sweeps through whatever sits between them on the colour wheel, and on the
   palettes where those two are far apart that is a third colour nobody chose.
   The block reads as a promotion from its fill and its position, and does not
   need a sweep to do it. */
.sp-footer-promo {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--sp-accent-primary);
    border-radius: 12px;
    margin-bottom: 30px;
}

.sp-footer-promo h2 {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.sp-footer-promo p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    margin-bottom: 0;
    line-height: 1.6;
}

.sp-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.sp-footer-links a {
    color: var(--sp-text-secondary);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s ease;
}

.sp-footer-links a:hover {
    color: var(--sp-text-primary);
}

.sp-footer-links .sp-footer-sep {
    color: var(--sp-text-muted);
}

.sp-footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.sp-footer-social-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.sp-footer-social-btn:hover {
    opacity: 0.9;
    color: #fff;
}

.sp-footer-social-btn.dmca {
    background-color: #D14836;
}

.sp-footer-social-btn.facebook {
    background-color: #3b5998;
}

.sp-footer-social-btn.youtube {
    background-color: #c4302b;
}

.sp-footer-social-btn.twitter {
    background-color: #1da1f2;
}

.sp-footer-heart {
    color: var(--sp-accent-secondary);
    font-size: 12px;
    font-weight: 600;
}

/* ====================== */
/* LIST VIEW STYLES       */
/* ====================== */
.sp-files-list {
    background-color: var(--sp-bg-secondary);
    border-radius: 8px;
    overflow: hidden;
}

.sp-files-list-header {
    display: grid;
    grid-template-columns: 40px 1fr 100px 120px 100px 80px;
    padding: 12px 16px;
    background-color: var(--sp-bg-card);
    font-size: 12px;
    font-weight: 600;
    color: var(--sp-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--sp-border-color);
}

.sp-files-list-row {
    display: grid;
    grid-template-columns: 40px 1fr 100px 120px 100px 80px;
    padding: 12px 16px;
    align-items: center;
    border-bottom: 1px solid var(--sp-border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.sp-files-list-row:hover {
    background-color: var(--sp-bg-card);
}

.sp-files-list-row.selected {
    background-color: var(--sp-bg-card-hover);
}

.sp-files-list-row:last-child {
    border-bottom: none;
}

.sp-files-list-thumb {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-files-list-thumb img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
}

.sp-files-list-thumb i {
    font-size: 24px;
    color: var(--sp-text-muted);
}

.sp-files-list-name {
    font-size: 14px;
    color: var(--sp-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
}

.sp-files-list-size, .sp-files-list-date, .sp-files-list-downloads, .sp-files-list-owner {
    font-size: 13px;
    color: var(--sp-text-secondary);
}

/* ====================== */
/* UTILITY CLASSES        */
/* ====================== */
.sp-hidden {
    display: none !important;
}

.sp-visible {
    display: block !important;
}

.sp-flex {
    display: flex !important;
}

.sp-text-center {
    text-align: center;
}

.sp-text-right {
    text-align: right;
}

.sp-mt-10 { margin-top: 10px; }
.sp-mt-20 { margin-top: 20px; }
.sp-mb-10 { margin-bottom: 10px; }
.sp-mb-20 { margin-bottom: 20px; }

/* Empty state */
.sp-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--sp-text-muted);
}

.sp-empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.sp-empty-state h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--sp-text-secondary);
}

.sp-empty-state p {
    font-size: 14px;
}

/* Loading state */
.sp-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.sp-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--sp-border-color);
    border-top-color: var(--sp-accent-primary);
    border-radius: 50%;
    animation: sp-spin 0.8s linear infinite;
}

@keyframes sp-spin {
}

/* ====================== */
/* RESPONSIVE STYLES      */
/* ====================== */
@media (max-width: 1200px) {
    .sp-files-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 992px) {
    .sp-header-nav-item a span {
        display: none;
    }
    
    .sp-header-nav-item a {
        padding: 8px 12px;
    }
    
    .sp-user-dropdown-name {
        display: none;
    }
    
    .sp-files-list-header,     .sp-files-list-row {
        grid-template-columns: 40px 1fr 80px 80px;
    }
    
    .sp-files-list-date,     .sp-files-list-owner {
        display: none;
    }
}

@media (max-width: 768px) {
    :root {
        --sp-sidebar-width: 0px;
    }
    
    .sp-sidebar {
        transform: translateX(-100%);
        width: 70px;
        transition: transform 0.3s ease;
    }
    
    .sp-sidebar.open {
        transform: translateX(0);
        --sp-sidebar-width: 70px;
    }
    
    .sp-main {
        margin-left: 0;
    }
    
    .sp-toolbar {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .sp-toolbar-left,     .sp-toolbar-right {
        width: 100%;
        justify-content: center;
    }
    
    .sp-header {
        padding: 0 10px;
    }
    
    .sp-header-logo {
        margin-right: 15px;
    }
    
    .sp-header-nav-item {
        margin: 0 4px;
    }
    
    .sp-files-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .sp-header-nav {
        display: none;
    }
    
    .sp-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .sp-toolbar {
        padding: 10px;
    }
    
    .sp-content {
        padding: 10px;
    }
    
    .sp-files-list-header,     .sp-files-list-row {
        grid-template-columns: 32px 1fr 60px;
    }
    
    .sp-files-list-downloads {
        display: none;
    }
}

/* Mobile menu toggle */
.sp-mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--sp-text-header);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

@media (max-width: 768px) {
    .sp-mobile-menu-toggle {
        display: block;
    }
}

/* Sidebar overlay for mobile */
.sp-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 850;
}

.sp-sidebar.open ~ .sp-sidebar-overlay {
    display: block;
}

/* ====================== */
/* INTEGRATION STYLES     */
/* ====================== */
/* Override existing file manager styles for new theme */
.sp-dashboard .fileManagerIcon .fileListing .fileIconLi {
    background-color: var(--sp-bg-card);
    border-color: transparent;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sp-dashboard .fileManagerIcon .fileListing .fileIconLi:hover {
    background-color: var(--sp-bg-card-hover);
    opacity: 1;
}

.sp-dashboard .fileManagerIcon .fileListing .fileIconLi span.filename {
    color: var(--sp-text-primary);
}

.sp-dashboard .fileManagerIcon .fileListing .fileIconLi span.filesizeAlt {
    color: var(--sp-text-muted);
}

.sp-dashboard .fileManagerIcon .fileListing .selected.fileIconLi, .sp-dashboard .fileManagerIcon .fileListing .active.fileIconLi {
    background-color: var(--sp-accent-primary) !important;
}

.sp-dashboard .fileManagerIcon .fileListing .selected.fileIconLi span.filename, .sp-dashboard .fileManagerIcon .fileListing .active.fileIconLi span.filename {
    color: #ffffff;
}

