/* =========================================================
   ULINK – CLEAN MEDICAL UI (FINAL)
========================================================= */

/* =========================
   Design Tokens
========================= */
:root {
    --primary: #1f4fbf;
    --primary-hover: #1a43a6;

    --text-main: #0f172a;
    --text-muted: #64748b;

    --bg-main: #f4f7fb;
    --bg-panel: #ffffff;
    --border: #e5e7eb;

    --radius: 12px;
    --shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* =========================
   Base
========================= */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    color: var(--text-main);
    background: var(--bg-main);
}

/* =========================
   HEADER – APP STYLE
========================= */

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
}

.brand-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.main-nav a {
    margin-left: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary);
}

/* =========================
   Layout
========================= */
.app-content {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.page-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 24px;
}

/* =========================
   Dashboard Panels (wie früher)
========================= */
.panel-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel {
    display: block;
    padding: 26px 24px;
    background: var(--bg-panel);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    text-align: center;   /* ⬅️ WICHTIG */
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.panel-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-main);
}

.panel-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}

.panel-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.panel-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* =========================
   Buttons & Links
========================= */
button,
.btn-open {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
}

button:hover,
.btn-open:hover {
    background: var(--primary-hover);
}

/* =========================
   Lists / Unterkacheln
========================= */
.file-row,
.sub-item,
.list-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.file-row:hover,
.sub-item:hover {
    background: #f8fafc;
}

/* =========================
   Footer
========================= */
.app-footer {
    margin: 40px 0 20px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.app-footer a {
    margin: 0 10px;
    text-decoration: none;
    color: var(--primary);
}

/* =========================================================
   AUTH / LOGIN – CLEAN MEDICAL PANEL
========================================================= */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-main);
}

.auth-panel {
    width: 100%;
    max-width: 420px;
    background: var(--bg-panel);
    padding: 36px 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.auth-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-main);
}

.auth-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.auth-footer {
    margin-top: 20px;
    font-size: 0.9rem;
}

/* =========================================================
   AUTH FORM – CLEAN LAYOUT
========================================================= */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form-group input {
    padding: 10px 12px;
    font-size: 0.95rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.full-width {
    width: 100%;
}

/* =========================================================
   LOGIN – RECHTLICHER FOOTER
========================================================= */

.auth-legal {
    margin-top: 24px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.auth-legal a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
}

.auth-legal a:hover {
    text-decoration: underline;
}

/* =========================
   DASHBOARD – TITLE
========================= */

.center-title {
    text-align: center;
}

/* =========================================================
   DATEILISTE – AKTIONS-HIERARCHIE
========================================================= */

.file-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 12px;
    border-bottom: 1px solid var(--border);
}

.file-main {
    max-width: 60%;
}

.file-name {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
}

.file-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Primäre Aktion */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

/* Sekundärer Link */
.link-secondary {
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: underline;
}

/* Destruktiv – zurückgenommen */
.btn-danger-text {
    background: none;
    border: none;
    color: #b91c1c;
    font-size: 0.8rem;
    cursor: pointer;
}

.btn-danger-text:hover {
    text-decoration: underline;
}

/* =========================================================
   DATEILISTE – VERTIKALER ZWANG (FINAL FIX)
========================================================= */

.file-list-vertical {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    max-width: 900px;
    margin: 0 auto;
}

.file-list-vertical .file-row {
    width: 100% !important;
    flex-direction: row !important;
}

/* =========================================================
   FINAL OVERRIDE – DATEILISTE EINSPALTIG
========================================================= */

/* Container darf NICHT flex-wrappen */
.file-list,
.file-list-vertical {
    display: block !important;
    width: 100% !important;
}

/* Jede Datei ist eine volle Zeile */
.file-row {
    display: block !important;
    width: 100% !important;
    clear: both !important;
}

/* Aktionen innerhalb der Zeile */
.file-actions {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

/* =========================================================
   DATEILISTE – AKTIONEN FEINSCHLIFF
========================================================= */

/* Öffnen: flacher, ruhiger */
.file-row .btn-primary {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 999px; /* Pill-Style */
}

/* QR-Link kleiner & dezenter */
.file-row .link-secondary {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Löschen noch ruhiger */
.file-row .btn-danger-text {
    font-size: 0.75rem;
}

/* =========================================================
   HEADER – UNTERSEITEN MENÜ KOMPAKT
========================================================= */

.main-nav a {
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 16px;
}

/* =========================================================
   UPLOAD – ZURÜCK LINK
========================================================= */

.main-nav a {
    font-size: 0.95rem;
    font-weight: 600;
}

/* =========================================================
   OP DETAIL – ACTIONS & UPLOAD LAYOUT
========================================================= */

.panel {
    padding: 28px 28px;
}

.panel-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 10px 0 16px 0;
}

/* Upload Zeile: label+input links, button rechts – aber ruhig */
.upload-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.upload-form label {
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}

.upload-form input[type="file"] {
    max-width: 320px;
    padding: 8px;
}

/* Hinweistext ruhiger */
.hint-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 18px;
    text-align: center;
}

/* leere Zustände */
.empty-state {
    color: var(--text-muted);
    text-align: center;
}

/* =========================================================
   OP DETAIL – VISUELLE RUHE
========================================================= */

/* Aktionen klar voneinander trennen */
.panel-actions {
    margin-bottom: 14px;
}

/* Upload stärker hervorheben */
.upload-form {
    margin: 20px 0 28px 0;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

/* Aktuelle Datei klar als Abschnitt */
.file-list {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.panel-list {
    margin-top: 24px;
}

