
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #101215;
    --surface: #191c21;
    --surface-dark: #14171b;
    --surface-hover: #20252b;
    --border: #30353d;
    --border-light: #424a55;

    --text: #edf0f4;
    --muted: #929ba8;
    --subtle: #717b88;

    --accent: #5278c4;
    --accent-hover: #6389d6;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 40px 20px;

    display: flex;
    justify-content: center;
    align-items: center;

    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 500px;
}

/* Branding */

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding-bottom: 24px;

    border-bottom: 1px solid var(--border);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;
    padding: 0;

    background: #272c34;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 18px;
}

/* Hauptkarte */

.card {
    padding: 36px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;

    box-shadow: 0 16px 48px rgba(0, 0, 0, .12);
}

h1 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.8px;
    text-align: left;
}

.subtitle {
    margin: 0 0 32px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    text-align: left;
}

/* Upload-Bereich */

.dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;

    padding: 42px 20px;

    background: var(--surface-dark);
    border: 1px dashed var(--border-light);
    border-radius: 4px;

    text-align: center;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

.dropzone:hover,
.dropzone.dragover {
    background: var(--surface-hover);
    border-color: var(--accent);
    transform: none;
}

.upload-icon {
    display: block;
    margin-bottom: 8px;
    font-size: 34px;
    line-height: 1;
}

.dropzone-title {
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
}

.dropzone-hint {
    color: var(--muted);
    font-size: 13px;
}

/* Verstecktes Dateifeld */

.file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.file-input:focus-visible + .dropzone {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

/* Dateiauswahl-Button */

.select-button {
    margin-top: 10px;
    padding: 10px 18px;

    background: #282e36;
    color: #e4e8ee;
    border: 1px solid #3c444f;
    border-radius: 3px;

    font-size: 12px;
    font-weight: 600;
    transition: background .2s;
}

.dropzone:hover .select-button {
    background: #343c48;
}

/* Gewählte Datei */

.file-name {
    margin: 20px 0;
    min-height: 18px;

    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
    overflow-wrap: anywhere;
}

/* Upload-Button */

.upload-button {
    display: block;
    width: 100%;
    padding: 15px 20px;

    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 3px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;

    transition: background .2s;
}

.upload-button:hover {
    background: var(--accent-hover);
    transform: none;
    box-shadow: none;
}

.upload-button:active {
    background: #4264a7;
}

/* Rückmeldung */

.message {
    margin-top: 20px;
    padding: 14px 16px;

    background: #1c2a26;
    border: 1px solid #365747;
    border-radius: 3px;

    color: #9bd2b1;
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
    overflow-wrap: anywhere;
}

/* Footer */

.footer {
    margin-top: 28px;
    color: var(--subtle);
    font-size: 11px;
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Mobile */

@media (max-width: 520px) {
    body {
        padding: 20px 16px;
    }

    .card {
        padding: 24px;
    }

    h1 {
        font-size: 23px;
    }

    .dropzone {
        padding: 32px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
    }
}


/* =====================================
   LOGIN
   ===================================== */

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

.form-group label {
    display: block;
    margin-bottom: 10px;

    color: #cbd5e1;
    font-size: 13px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 14px;

    background: #14171b;
    border: 1px solid #424a55;
    border-radius: 3px;

    color: #edf0f4;
    font-family: inherit;
    font-size: 14px;

    outline: none;
    transition: border-color .2s;
}

.form-input::placeholder {
    color: #717b88;
}

.form-input:hover {
    border-color: #586271;
}

.form-input:focus {
    border-color: #5278c4;
}

.login-error {
    padding: 14px 16px;
    margin-bottom: 24px;

    background: #302023;
    border: 1px solid #704047;
    border-radius: 3px;

    color: #f0a4ab;
    font-size: 13px;
    line-height: 1.5;
}

.login-footer {
    margin-top: 24px;
    padding-top: 20px;

    border-top: 1px solid #30353d;

    color: #717b88;
    text-align: center;
    font-size: 12px;
}

.logout-button {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 16px;

    background: transparent;
    color: #929ba8;
    border: 1px solid #30353d;
    border-radius: 3px;

    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

.logout-button:hover {
    color: #edf0f4;
    background: #20252b;
    border-color: #424a55;
}


/* =====================================
   FILESPACE DASHBOARD
   ===================================== */

.dashboard-container {
    max-width: 1100px;
    width: 100%;
}

/* HEADER */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;

    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.dashboard-header .brand {
    margin: 0;
    padding: 0;
    border: none;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--muted);
    font-size: 12px;
}

.logout-link {
    padding: 9px 12px;
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 3px;
    font: inherit;
    cursor: pointer;
}

.logout-link:hover {
    background: var(--surface-hover);
    color: var(--text);
}

/* GRID */

.dashboard-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 22px;
    align-items: start;
}

.dashboard-grid .card {
    min-width: 0;
    height: 100%;
}

.section-label {
    display: block;
    margin-bottom: 22px;
    color: var(--subtle);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
}

/* FILE LIST */

.files-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.file-count {
    padding: 4px 9px;
    background: #282e36;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text);
    font-size: 11px;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 410px;
    overflow-y: auto;
    padding-right: 4px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 17px 0;
    border-bottom: 1px solid var(--border);
}

.file-item:first-child {
    padding-top: 0;
}

.file-item:last-child {
    border-bottom: 0;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.file-type-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;

    background: #252b33;
    border: 1px solid var(--border);
    border-radius: 4px;

    color: #9da9b9;
    font-size: 22px;
}

.file-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.stored-file-name {
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stored-file-size {
    color: var(--subtle);
    font-size: 11px;
}

/* ACTION BUTTONS */

.file-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.file-actions form {
    margin: 0;
}

.action-button {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 34px;
    height: 34px;
    padding: 0;

    border-radius: 3px;
    font-family: inherit;
    font-size: 18px;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

.download-button {
    color: #9cb9ed;
    background: #252e3e;
    border: 1px solid #344563;
}

.download-button:hover {
    background: #344665;
    border-color: #5278c4;
}

.delete-button {
    color: #e6a0a7;
    background: #37272b;
    border: 1px solid #59373d;
}

.delete-button:hover {
    background: #563036;
    border-color: #a75662;
}

/* EMPTY STATE */

.empty-state {
    padding: 55px 16px;
    text-align: center;
    border: 1px dashed var(--border-light);
    border-radius: 4px;
}

.empty-icon {
    margin-bottom: 16px;
    color: var(--subtle);
    font-size: 34px;
}

.empty-state p {
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}

.empty-state span {
    color: var(--muted);
    font-size: 12px;
}

/* SCROLLBAR */

.file-list::-webkit-scrollbar {
    width: 5px;
}

.file-list::-webkit-scrollbar-thumb {
    background: #424a55;
    border-radius: 3px;
}

/* RESPONSIVE */

@media (max-width: 800px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .dashboard-header {
        align-items: flex-start;
    }

    .user-info {
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
    }

    .dashboard-grid .card {
        padding: 24px;
    }

    .file-item {
        gap: 8px;
    }
}
