/*
 * READ Landscapes — Layout Styles
 * Admin, client, and auth page layouts.
 */

/* ── AUTH LAYOUT (centered card) ──────────── */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: var(--bg-card);
    border: 0.5px solid var(--border-mid);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-logo img {
    height: 36px;
}

.auth-logo-text {
    font-family: var(--f-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-family: var(--f-accent);
    font-style: italic;
    font-size: 18px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 12px;
    color: var(--text-muted);
}

/* ── ADMIN LAYOUT ─────────────────────────── */

.admin-topbar {
    background: var(--bg-nav);
    border-bottom: 0.5px solid var(--border-mid);
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-topbar-brand img {
    height: 24px;
}

.admin-topbar-title {
    font-family: var(--f-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.admin-topbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.admin-topbar-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--topbar-text);
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
}

.admin-topbar-link:hover {
    color: var(--topbar-text-strong);
    background: rgba(255,255,255,0.06);
    text-decoration: none;
}

.admin-topbar-link.active {
    color: #D4715A; /* terra-text — always against dark nav */
    background: rgba(212,113,90,0.12);
}

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

.admin-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.admin-page-header {
    margin-bottom: 2rem;
}

.admin-page-title {
    font-family: var(--f-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.admin-page-subtitle {
    font-family: var(--f-accent);
    font-style: italic;
    font-size: 18px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 1rem;
}

/* ── CLIENT LAYOUT ────────────────────────── */

.client-topbar {
    background: var(--bg-nav);
    border-bottom: 0.5px solid var(--border-mid);
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.client-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.client-topbar-brand img {
    height: 24px;
}

.client-topbar-title {
    font-family: var(--f-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--topbar-text-strong);
    letter-spacing: -0.01em;
}

.client-topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--topbar-text);
}

.client-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.client-welcome {
    margin-bottom: 2rem;
}

.client-welcome h1 {
    font-size: 28px;
    margin-bottom: 4px;
}

.client-footer {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    border-top: 0.5px solid var(--border);
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

.client-footer a {
    color: var(--terra-text);
}

/* ── ERROR PAGES ──────────────────────────── */

.error-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.error-code {
    font-family: var(--f-display);
    font-size: 64px;
    font-weight: 700;
    color: var(--text-muted);
    line-height: 1;
    margin-bottom: 0.75rem;
}

.error-message {
    font-family: var(--f-accent);
    font-style: italic;
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ── RESPONSIVE ───────────────────────────── */

@media (max-width: 768px) {
    .admin-topbar-nav {
        display: none;
    }

    .admin-content,
    .client-content {
        padding: 1.5rem 1rem 3rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }

    h1 { font-size: 26px; }
    h2 { font-size: 20px; }

    /* Client topbar: hide name on very small screens */
    .client-topbar-user span {
        display: none;
    }

    /* Client welcome: tighten up */
    .client-welcome h1 {
        font-size: 22px;
    }

    .client-welcome .accent-text-md {
        font-size: 16px;
    }

    /* Phase tracker: increase dot size on mobile for touch */
    .phase-dot {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
}

/* ── Drag-and-drop upload zone ────────────────────── */
.drop-zone {
    border: 1.5px dashed var(--border-mid);
    border-radius: var(--radius);
    padding: 16px 20px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--terra-text);
    background: rgba(212,113,90,0.05);
}

.drop-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    pointer-events: none;
}

.drop-icon {
    font-size: 16px;
    color: var(--terra-text);
}

/* ── Upload loading spinner ───────────────────────── */
@keyframes rp-spin {
    to { transform: rotate(360deg); }
}

.upload-spinner {
    display: inline-block;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rp-spin 0.65s linear infinite;
    vertical-align: middle;
    margin-right: 5px;
    flex-shrink: 0;
}

/* Spinner inside ghost button (dark text context) */
.btn-ghost .upload-spinner {
    border-color: rgba(0, 0, 0, 0.15);
    border-top-color: var(--terra-text);
}

/* Drop zone dimmed while uploading */
.drop-zone.uploading {
    opacity: 0.5;
    pointer-events: none;
}

/* Visually-hidden file input — must NOT be display:none, or
   programmatic .click() won't open the picker on Safari. */
.upload-file-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
}

/* ── Upload zone label — sits above the tap target ── */
.upload-zone-label {
    font: 700 11px var(--f-mono);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--terra-text);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.upload-zone-label__icon { font-size: 14px; }

/* ── Mobile-friendly tap-to-upload widget ──────────
   Tinted terracotta so it doesn't blend into the cards around it; it's
   the primary action of an upload step, the loudest thing on the page. */
.upload-tap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 22px;
    min-height: 78px;
    border-radius: var(--radius-lg);
    background: rgba(212, 113, 90, 0.10);
    border: 2px dashed var(--terra-text);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.05s;
    -webkit-tap-highlight-color: transparent;
}

.upload-tap:hover,
.upload-tap.dragover,
.upload-tap:focus-within {
    border-color: var(--terra);
    background: rgba(212, 113, 90, 0.18);
    outline: none;
}

.upload-tap:active {
    transform: scale(0.99);
}

.upload-tap-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.upload-tap-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

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

.upload-tap-hint {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

@media (max-width: 600px) {
    .upload-tap { padding: 22px 18px; min-height: 78px; }
    .upload-tap-icon { font-size: 32px; }
    .upload-tap-title { font-size: 16px; }
}

.upload-thumbs {
    display: grid;
    gap: 8px;
}
