/* ═══════════════════════════════════════════════════════════════
   Trenam Law Upload Portal — site.css
   Colors extracted from logo: navy #1a3a5c, gold/green #8fa83b
   ═══════════════════════════════════════════════════════════════ */

:root {
    --navy:       #1a3a5c;
    --navy-dark:  #122a42;
    --navy-light: #2a5580;
    --accent:     #8fa83b;
    --accent-dark:#7a9132;
    --white:      #ffffff;
    --gray-50:    #f8f9fa;
    --gray-100:   #f1f3f5;
    --gray-200:   #e9ecef;
    --gray-300:   #dee2e6;
    --gray-400:   #ced4da;
    --gray-500:   #adb5bd;
    --gray-600:   #868e96;
    --gray-700:   #495057;
    --gray-800:   #343a40;
    --gray-900:   #212529;
    --red:        #dc3545;
    --red-light:  #fdf0f0;
    --green:      #27ae60;
    --green-light:#edfff4;
    --radius:     8px;
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:  0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg:  0 8px 24px rgba(0,0,0,0.12);
    --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
    background: var(--navy);
    color: var(--white);
    padding: 0 24px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-content {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo {
    height: 36px;
    width: auto;
}
.firm-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--white);
}
.firm-sub {
    font-weight: 300;
    color: var(--accent);
    margin-left: 4px;
}
.portal-title {
    font-size: 14px;
    font-weight: 400;
    color: var(--gray-300);
    letter-spacing: 0.3px;
}

/* ── Main ───────────────────────────────────────────────────── */
.main-content {
    flex: 1;
    max-width: 720px;
    width: 100%;
    margin: 32px auto;
    padding: 0 16px;
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
    background: var(--gray-800);
    color: var(--gray-400);
    text-align: center;
    padding: 20px 24px;
    font-size: 12px;
}
.site-footer p { margin: 2px 0; }

/* ── Step Indicator ─────────────────────────────────────────── */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    gap: 0;
}
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0.4;
    transition: opacity var(--transition);
}
.step.active { opacity: 1; }
.step.completed { opacity: 0.7; }
.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-300);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all var(--transition);
}
.step.active .step-number {
    background: var(--navy);
    color: var(--white);
}
.step.completed .step-number {
    background: var(--green);
    color: var(--white);
}
.step-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-600);
    white-space: nowrap;
}
.step.active .step-label { color: var(--navy); font-weight: 600; }
.step-connector {
    width: 60px;
    height: 2px;
    background: var(--gray-300);
    margin: 0 8px;
    margin-bottom: 20px;
}

/* ── Form Panels ────────────────────────────────────────────── */
.form-panel {
    display: none;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 32px;
    animation: fadeIn 0.3s ease;
}
.form-panel.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.panel-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
}
.panel-subtitle {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 24px;
}

/* ── Form Elements ──────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}
.required { color: var(--red); }
.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    color: var(--gray-800);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus {
    outline: none;
    border-color: var(--navy-light);
    box-shadow: 0 0 0 3px rgba(26,58,92,0.12);
}
.form-input.error {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(220,53,69,0.1);
}
.field-hint {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}
.field-error {
    font-size: 13px;
    color: var(--red);
    margin-top: 4px;
    min-height: 0;
}
.char-counter {
    text-align: right;
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

textarea.form-input { resize: vertical; min-height: 72px; }

/* ── Buttons ────────────────────────────────────────────────── */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-primary {
    background: var(--navy);
    color: var(--white);
}
.btn-primary:hover:not(:disabled) {
    background: var(--navy-dark);
    box-shadow: var(--shadow-sm);
}
.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}
.btn-secondary:hover:not(:disabled) {
    background: var(--gray-300);
}
.btn-outline {
    background: transparent;
    color: var(--navy);
    border: 1.5px solid var(--navy);
    padding: 10px 22px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    transition: all var(--transition);
}
.btn-outline:hover {
    background: var(--navy);
    color: var(--white);
}
.btn-text {
    background: none;
    border: none;
    color: var(--red);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}
.btn-text:hover { text-decoration: underline; }
.btn-icon, .btn-icon-left { width: 16px; height: 16px; }

/* ── Drop Zone ──────────────────────────────────────────────── */
.drop-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 40px 24px;
    text-align: center;
    transition: all var(--transition);
    cursor: pointer;
}
.drop-zone.dragover {
    border-color: var(--navy);
    background: rgba(26,58,92,0.04);
}
.drop-icon {
    width: 48px;
    height: 48px;
    color: var(--gray-400);
    margin-bottom: 12px;
}
.drop-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 4px;
}
.drop-subtext {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 12px;
}

/* ── File List ──────────────────────────────────────────────── */
.file-list {
    margin-top: 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
}
.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
}
.file-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    gap: 12px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
}
.file-item:last-child { border-bottom: none; }
.file-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--navy);
    text-transform: uppercase;
    flex-shrink: 0;
}
.file-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--gray-800);
}
.file-item-size {
    font-size: 12px;
    color: var(--gray-500);
    flex-shrink: 0;
}
.file-item-remove {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
    line-height: 1;
    transition: color var(--transition);
}
.file-item-remove:hover { color: var(--red); }
.file-summary {
    padding: 10px 16px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    font-size: 13px;
    color: var(--gray-600);
}

/* ── Progress Overlay ───────────────────────────────────────── */
.progress-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}
.progress-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    min-width: 360px;
    box-shadow: var(--shadow-lg);
}
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--navy);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    margin: 16px 0 8px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: var(--navy);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}
.progress-percent {
    font-size: 13px;
    color: var(--gray-600);
    font-weight: 500;
}

/* ── Confirmation Card ──────────────────────────────────────── */
.confirmation-card, .error-card {
    text-align: center;
    padding: 16px 0;
}
.confirmation-icon svg, .error-icon svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
}
.confirmation-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--green);
    margin-bottom: 8px;
}
.confirmation-subtitle {
    color: var(--gray-600);
    margin-bottom: 28px;
}
.confirmation-details {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 20px 24px;
    text-align: left;
    margin: 0 auto 20px;
    max-width: 440px;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
}
.detail-row:last-child { border-bottom: none; }
.detail-label {
    font-size: 13px;
    color: var(--gray-600);
    font-weight: 500;
}
.detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}
.confirmation-note {
    background: #fef9e7;
    border: 1px solid #f9e79f;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--gray-700);
    margin: 0 auto 8px;
    max-width: 500px;
    text-align: left;
}

/* ── Error Card ─────────────────────────────────────────────── */
.error-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 8px;
}
.error-message {
    color: var(--gray-600);
    margin-bottom: 20px;
}
.error-file-list {
    background: var(--red-light);
    border-radius: 6px;
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    color: var(--red);
    margin: 0 auto 16px;
    max-width: 500px;
}
.error-file-list li { margin: 4px 0 4px 16px; }

/* ── Utility ────────────────────────────────────────────────── */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
    .header-content { flex-direction: column; height: auto; padding: 12px 0; gap: 4px; }
    .portal-title { font-size: 12px; }
    .main-content { margin: 16px auto; }
    .form-panel { padding: 20px; }
    .step-label { font-size: 10px; }
    .step-connector { width: 32px; }
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; justify-content: center; }
    .confirmation-details { padding: 16px; }
}
