/* ══════════════════════════════════════════
   rescue-24.de — Portal Styles
   ══════════════════════════════════════════ */

/* ── Login page ────────────────────────────── */
.login-body {
    background: var(--navy);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-wrap {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.login-logo-link {
    display: block;
}

.login-logo {
    height: 64px;
    width: auto;
    border-radius: 8px;
    background: rgba(255,255,255,0.95);
    padding: 6px 12px;
    display: block;
}

.login-card {
    width: 100%;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-card__title {
    font-size: 1.5rem;
    color: var(--navy);
    margin-bottom: 4px;
}

.login-card__sub {
    color: var(--text-light);
    font-size: 0.88rem;
    margin-bottom: 28px;
}

.login-field {
    margin-bottom: 18px;
}

.login-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--navy);
    margin-bottom: 6px;
}

.login-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: border-color 0.18s;
    background: var(--gray-50);
    color: var(--text);
}

.login-field input:focus {
    outline: none;
    border-color: var(--steel);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(78,112,150,0.12);
}

.login-submit {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
    padding: 13px 24px;
}

.login-back {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.18s;
}

.login-back:hover {
    color: rgba(255,255,255,0.9);
}

/* ── Alerts ───────────────────────────────── */
.portal-alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.88rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.portal-alert--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.portal-alert--success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ── Portal page banner ───────────────────── */
.portal-banner {
    background: var(--navy);
    color: #fff;
    padding: 40px 0 36px;
}

.portal-banner .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.portal-banner h1 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 4px;
}

.portal-banner__meta {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.65);
}

.portal-banner__meta strong {
    color: rgba(255,255,255,0.9);
}

/* ── Portal body ──────────────────────────── */
.portal-body {
    background: var(--gray-50);
    min-height: 60vh;
    padding: 36px 0 72px;
}

.portal-content {
    max-width: 860px;
}

/* ── Tabs ─────────────────────────────────── */
.portal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 28px;
    background: #fff;
    padding: 6px;
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid var(--gray-200);
}

.portal-tab {
    padding: 8px 18px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.18s;
    white-space: nowrap;
}

.portal-tab:hover {
    background: var(--gray-50);
    color: var(--navy);
}

.portal-tab--active {
    background: var(--navy);
    color: #fff !important;
}

/* ── Upload card ──────────────────────────── */
.upload-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.upload-card__title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 16px;
}

.upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 2px dashed var(--gray-200);
    border-radius: var(--radius);
    padding: 32px 24px;
    cursor: pointer;
    transition: all 0.18s;
    text-align: center;
    margin-bottom: 16px;
    background: var(--gray-50);
}

.upload-zone:hover {
    border-color: var(--steel);
    background: #f0f5f9;
}

.upload-zone input[type="file"] {
    display: none;
}

.upload-zone__icon {
    width: 36px;
    height: 36px;
    color: var(--steel);
    opacity: 0.7;
}

.upload-zone__text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--navy);
}

.upload-zone__hint {
    font-size: 0.8rem;
    color: var(--text-light);
}

.upload-zone__selected {
    font-size: 0.82rem;
    color: var(--steel);
    font-weight: 600;
    min-height: 1.2em;
}

/* ── File list ────────────────────────────── */
.file-list-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.file-list-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.file-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.12s;
}

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

.file-item:hover {
    background: var(--gray-50);
}

/* Extension badge */
.file-ext {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #fff;
}

.file-ext--pdf  { background: #dc2626; }
.file-ext--jpg,
.file-ext--jpeg { background: var(--steel); }
.file-ext--png  { background: #059669; }

/* File info */
.file-item__info {
    flex: 1;
    min-width: 0;
}

.file-item__name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--navy);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-item__meta {
    display: block;
    font-size: 0.78rem;
    color: var(--text-light);
    margin-top: 2px;
}

/* Action buttons */
.file-item__actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.btn-file {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: var(--radius);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid transparent;
    text-decoration: none;
    background: none;
    font-family: var(--font-body);
    white-space: nowrap;
}

.btn-file svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.btn-file--preview {
    color: var(--steel);
    border-color: var(--steel);
}

.btn-file--preview:hover {
    background: var(--steel);
    color: #fff;
}

.btn-file--download {
    color: var(--navy);
    border-color: var(--gray-200);
}

.btn-file--download:hover {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

.btn-file--delete {
    color: #dc2626;
    border-color: #fecaca;
}

.btn-file--delete:hover {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

/* ── Empty state ──────────────────────────── */
.portal-empty {
    padding: 60px 24px;
    text-align: center;
    color: var(--text-light);
}

.portal-empty__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    opacity: 0.35;
    display: block;
}

.portal-empty p {
    margin: 0;
    font-size: 0.9rem;
}

/* ── Preview overlay ──────────────────────── */
.preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,18,36,0.9);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.preview-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9001;
    transition: background 0.15s;
    color: var(--navy);
}

.preview-close svg {
    width: 22px;
    height: 22px;
}

.preview-close:hover {
    background: #fff;
}

.preview-content {
    width: 95vw;
    height: 90vh;
    display: block;
}

/* Zoom-Steuerung (nur für Bilder) */
.preview-zoom-controls {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 9002;
}

.preview-zoom-btn {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.92);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    transition: background 0.15s, transform 0.1s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.preview-zoom-btn:hover {
    background: #fff;
    transform: scale(1.08);
}

.preview-zoom-btn svg {
    width: 22px;
    height: 22px;
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 640px) {
    .login-card {
        padding: 28px 20px;
    }

    .portal-banner .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .portal-banner h1 {
        font-size: 1.4rem;
    }

    .file-item {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 16px;
    }

    .file-item__actions {
        width: 100%;
        justify-content: flex-end;
    }

    .btn-file span {
        display: none;
    }

    .btn-file {
        padding: 6px 8px;
    }

    .upload-card {
        padding: 20px;
    }

    .portal-tabs {
        gap: 2px;
    }

    .portal-tab {
        padding: 7px 12px;
        font-size: 0.8rem;
    }
}
