html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}
/* Overall shell ----------------------------------------------------------- */

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f7f7f9;
}

.app-shell {
    display: grid;
    grid-template-columns: 56px 220px minmax(0, 1fr);
    height: 100vh;
}

/* Left icon sidebar ------------------------------------------------------- */

.sidebar-main {
    background: #111827;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px 0;
}

.sidebar-main-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.logo-circle {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #4f46e5;
}

.main-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0.7;
}

    .nav-icon.active,
    .nav-icon:hover {
        background: rgba(255, 255, 255, 0.12);
        opacity: 1;
    }

.icon-placeholder {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.7);
}

.sidebar-main-bottom {
    display: flex;
    justify-content: center;
}

/* Secondary sidebar ------------------------------------------------------ */

.sidebar-secondary {
    background: #f3f4f6;
    border-right: 1px solid #e5e7eb;
    padding: 12px 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 14px;
}

.sidebar-section {
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

    .sidebar-section:last-child {
        border-bottom: none;
    }

.sidebar-title {
    margin: 4px 0 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6b7280;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .sidebar-list li a {
        display: block;
        padding: 6px 8px;
        border-radius: 6px;
        text-decoration: none;
        color: #111827;
    }

        .sidebar-list li.active a,
        .sidebar-list li a:hover {
            background: #e5e7eb;
        }

/* Main content ----------------------------------------------------------- */

.content-area {
    display: flex;
    flex-direction: column;
    padding: 16px 24px;
    overflow: hidden;
}

/* Header & toolbar */

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

    .content-header h1 {
        font-size: 22px;
        margin: 0;
    }

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

/* Buttons */

.btn {
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid #d1d5db;
}

.btn-link {
    border: none;
    background: transparent;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 999px;
}

    .btn-link.active,
    .btn-link:hover {
        background: #e5e7eb;
    }

/* Toolbar row */

.content-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    gap: 4px;
}

/* File list -------------------------------------------------------------- */

.file-list {
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    font-size: 14px;
}

.file-list-header,
.file-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1.6fr) 1fr 1fr 0.8fr;
    align-items: center;
    padding: 8px 12px;
}

.file-list-header {
    background: #f9fafb;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b7280;
}

.file-row:nth-child(even) {
    background: #fcfcfd;
}

.file-row:hover {
    background: #eff6ff;
}

.col-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-icon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: inline-block;
}

    /* fake file-type colors */
    .file-icon.folder {
        background: #2563eb;
    }

    .file-icon.link {
        background: #6b7280;
    }

    .file-icon.pdf {
        background: #dc2626;
    }

/* small checkbox column */
.col-checkbox {
    display: flex;
    justify-content: center;
}

/* Responsive tweak */
@media (max-width: 960px) {
    .app-shell {
        grid-template-columns: 56px minmax(0,1fr);
    }

    .sidebar-secondary {
        display: none;
    }
}
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    padding-top: 16px;
}

.file-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
    overflow: hidden;
}

    .file-card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
        transform: translateY(-2px);
        border-color: rgba(0, 0, 0, 0.08);
    }

.file-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Top preview block */
.file-thumb {
    background: #f5f5f5;
    border-radius: 12px 12px 0 0;
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #555;
    overflow: hidden;
}

.file-type-label {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    text-transform: uppercase;
}

/* File title */
.file-title {
    padding: 8px 12px 4px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bottom meta row */
.file-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px 10px;
    font-size: 11px;
    color: #666;
}

.file-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffb300, #ff7043);
    flex-shrink: 0;
}

.file-meta-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.file-meta-owner {
    font-weight: 500;
}

.file-meta-date {
    color: #999;
}

.file-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px 12px 0 0;
    font-size: 20px;
    color: white;
    overflow: hidden;
}

    /* Generic file */
    .file-thumb.generic {
        background: #e0e0e0;
        color: #555;
    }

    /* Type colors */
    .file-thumb.pdf {
        background: #D93025;
    }

    .file-thumb.doc {
        background: #1A73E8;
    }

    .file-thumb.xls {
        background: #0F9D58;
    }

    .file-thumb.ppt {
        background: #FB8C00;
    }

    .file-thumb.txt {
        background: #757575;
    }

    .file-thumb.zip {
        background: #5E35B1;
    }

    .file-thumb.url {
        background: #616161;
    }

    /* Image preview */
    .file-thumb.image {
        background: #fafafa;
    }

.file-image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Icon label (PDF, DOCX, etc.) */
.file-icon-label {
    font-size: 16px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.25);
    padding: 6px 12px;
    border-radius: 6px;
    text-transform: uppercase;
}
.app-shell.single-column {
    grid-template-columns: minmax(0, 1fr);
}

/* File: wwwroot/css/site.css
   Add the following at the end of the file (or merge into Navbar / site rules) */

/* Make the user tile align & size like nav links */
.nav-item.nav-usertile,
.nav-usertile {
    display: flex;                 /* align like nav items */
    align-items: center;           /* vertical center */
    padding: 0.5rem 1rem;          /* same vertical rhythm as .nav-link */
    margin-left: 0.25rem;
    color: var(--bs-body-color, #212529); /* match default text color */
    font-weight: 600;              /* slightly emphasized */
    font-size: 0.95rem;
    line-height: 1;                /* consistent line height */
    border-radius: 0.25rem;        /* small rounding like buttons */
    cursor: default;               /* not a clickable link */
    white-space: nowrap;           /* avoid wrapping the username */
    -webkit-user-select: none;
    user-select: none;
}

/* Visual affordance similar to nav links on hover/focus */
.nav-item.nav-usertile:hover,
.nav-item.nav-usertile:focus,
.nav-usertile:hover,
.nav-usertile:focus {
    background-color: rgba(0, 0, 0, 0.04);
    color: var(--bs-body-color, #212529);
    text-decoration: none;
}

/* Keep layout consistent on small screens */
@media (max-width: 575.98px) {
    .nav-item.nav-usertile,
    .nav-usertile {
        padding-top: 0.375rem;
        padding-bottom: 0.375rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}
