/* White header + single flat logo blue (#0e6ebe sampled from posspro_logo.png) */

:root {
    --logo-blue: #0e6ebe;

    --blue-900: #071729;
    --blue-850: #0c2340;
    --blue-800: #123a6b;
    --blue-700: #1e4d8c;
    --blue-600: #2a63b3;
    --blue-400: #5c9fd8;
    --blue-200: #b8d4ff;
    --blue-100: #e8f0fb;
    --white: #ffffff;
    --header-text: var(--blue-850);
    --header-link: var(--logo-blue);
    --header-link-hover: #0a5aa3;
    --header-border: rgba(14, 110, 190, 0.18);

    --main-text: rgba(238, 245, 255, 0.95);
    --main-text-soft: rgba(200, 220, 245, 0.85);
    --main-muted: rgba(218, 234, 255, 0.78);

    --card-bg: #f8fbff;
    --card-text: var(--blue-850);
    --card-border: rgba(255, 255, 255, 0.33);
    --card-shadow: 0 8px 26px rgba(5, 40, 80, 0.28);

    --accent-line: rgba(255, 255, 255, 0.85);
    --radius: 12px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;

    --footer-bg: #084a82;
    --footer-text: rgba(220, 232, 250, 0.72);
    --footer-border: rgba(255, 255, 255, 0.06);

    /** Folder glyph: interior tint (outline stays --logo-blue via currentColor) */
    --folder-icon-fill: #d4ebfb;
    --folder-icon-fill-hover: #bedef7;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font);
    line-height: 1.5;
    background: var(--logo-blue);
}

/* --- Header (white — logo blends) --- */
.site-header {
    flex-shrink: 0;
    text-align: center;
    padding: 2rem 1.25rem 1.5rem;
    background: var(--white);
    color: var(--header-text);
    border-bottom: 1px solid var(--header-border);
    box-shadow: 0 4px 20px rgba(12, 35, 64, 0.07);
}

.logo {
    display: block;
    margin: 0 auto 1rem;
    max-width: min(220px, 70vw);
    height: auto;
}

.site-title {
    margin: 0;
    font-size: clamp(1.1rem, 3.25vw, 1.55rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--logo-blue);
}

.breadcrumb {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--header-link);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
    color: var(--header-link-hover);
}

.breadcrumb .sep {
    color: rgba(14, 110, 190, 0.4);
    margin: 0 0.15em;
}

/* --- Main (flat logo blue, full bleed with body) --- */
.main {
    flex: 1 0 auto;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 1.75rem 1.25rem 2.5rem;
    color: var(--main-text);
    background: var(--logo-blue);
}

.toolbar {
    margin-bottom: 1.25rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.btn-back {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(6px);
}

.btn-back:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

.section {
    margin-bottom: 2rem;
}

.section-title {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--main-text);
    border-left: 4px solid var(--accent-line);
    padding-left: 0.65rem;
}

.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.folder-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 120px;
    padding: 1.1rem;
    background: var(--card-bg);
    color: var(--card-text);
    text-decoration: none;
    border-radius: var(--radius);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.folder-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 14px 36px rgba(6, 20, 40, 0.45);
}

/* Disabled folders (e.g. updates): visible but not openable + slanted stripe overlay */
.folder-card--disabled {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    opacity: 0.72;
    cursor: not-allowed;
    background: #dfe3ea;
    color: #4b5663;
    border-color: rgba(75, 86, 99, 0.28);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    pointer-events: none;
    user-select: none;
}

.folder-card--disabled::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    pointer-events: none;
    background: repeating-linear-gradient(
        -42deg,
        transparent,
        transparent 11px,
        rgba(168, 215, 255, 0.55) 11px,
        rgba(168, 215, 255, 0.55) 17px
    );
}

.folder-card--disabled .folder-icon,
.folder-card--disabled .folder-name {
    position: relative;
    z-index: 1;
}

.folder-card.folder-card--disabled:hover {
    transform: none;
    border-color: rgba(75, 86, 99, 0.28);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.folder-card--disabled .folder-icon {
    color: #7f8b99;
}

.folder-card--disabled .folder-icon svg path {
    fill: #cfd6e0;
    stroke: #7f8b99;
}

.folder-card.folder-card--disabled:hover .folder-icon svg path {
    fill: #cfd6e0;
}

.folder-card--disabled .folder-name {
    color: #5c6674;
}

.folder-disabled-msg {
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
}

.folder-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    color: var(--logo-blue);
    flex-shrink: 0;
}

.folder-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.folder-icon svg path {
    fill: var(--folder-icon-fill);
    stroke: currentColor;
}

.folder-card:hover .folder-icon svg path {
    fill: var(--folder-icon-fill-hover);
}

.folder-name {
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    word-break: break-word;
}

.file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.file-list li + li {
    border-top: 1px solid rgba(18, 58, 107, 0.1);
}

.file-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.85rem;
    row-gap: 0.35rem;
    padding: 0.85rem 1.1rem;
    color: var(--card-text);
    text-decoration: none;
    transition: background 0.12s ease;
}

.file-row:hover {
    background: rgba(30, 77, 140, 0.08);
}

.file-icon {
    color: var(--logo-blue);
    font-weight: 700;
}

.file-name {
    font-weight: 500;
    word-break: break-word;
}

.file-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem 1.15rem;
    white-space: nowrap;
}

.file-date {
    font-size: 0.85rem;
    color: #4a6278;
}

.file-size {
    font-size: 0.85rem;
    font-weight: 700;
    color: #4a6278;
    white-space: nowrap;
}

.empty {
    text-align: center;
    color: var(--main-muted);
    padding: 2rem;
    margin: 0;
}

/* --- Footer pinned to viewport bottom when content is short --- */
.site-footer {
    flex-shrink: 0;
    text-align: center;
    padding: 1rem 1.25rem 1.25rem;
    font-size: 0.85rem;
    color: var(--footer-text);
    background: var(--footer-bg);
    border-top: 1px solid var(--footer-border);
}

@media (max-width: 480px) {
    .file-row {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-items: center;
    }

    .file-icon {
        grid-row: 1 / span 2;
    }

    .file-name {
        grid-column: 2;
        grid-row: 1;
    }

    .file-meta {
        grid-column: 2;
        grid-row: 2;
        justify-content: space-between;
        width: 100%;
        margin-top: 0.1rem;
        white-space: normal;
    }
}
