/* ═══════════════════════════════════════════════════
   Waterstone Leadership Assessment
   All styles scoped under .app-shell to beat Bootstrap
   ═══════════════════════════════════════════════════ */

:root {
    --navy: #1B3A5C;
    --blue: #2E75B6;
    --orange: #E8740C;
    --bg: #F2F7FB;
    --success: #2E7D32;
    --text: #333;
    --muted: #64748B;
    --slate-200: #E2E8F0;
    --slate-300: #CBD5E1;
    --slate-400: #94A3B8;
    --slate-50: #F8FAFC;
}

/* ── Bootstrap heading overrides ── */
.app-shell h1,
.app-shell h2,
.app-shell h3,
.app-shell h4 {
    font-size: inherit;
    font-weight: inherit;
    margin: 0;
    padding: 0;
    line-height: inherit;
}

.app-shell p {
    margin: 0;
}

.app-shell label {
    margin: 0;
}

/* ══════════════════════════════════
   SHELL: Full viewport, no scroll
   ══════════════════════════════════ */
.app-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: var(--bg);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
}

/* ══════════════════════════════════
   HEADER
   ══════════════════════════════════ */
.app-shell .app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 2rem;
    background: #fff;
    border-bottom: 1px solid var(--slate-200);
    flex-shrink: 0;
    z-index: 10;
}

.app-shell .header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-shell .header-logo {
    height: 42px;
    width: auto;
}

.app-shell .header-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.2;
    margin: 0;
}

.app-shell .header-subtitle {
    font-size: 0.7rem;
    color: var(--muted);
    font-weight: 500;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.app-shell .header-right {
    text-align: right;
}

.app-shell .header-brand {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--slate-400);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* Status pills */
.app-shell .status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.app-shell .status-processing {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    color: #1D4ED8;
}

.app-shell .status-complete {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: var(--success);
}

.app-shell .status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    display: inline-block;
}

.app-shell .status-dot-pulse {
    background: #3B82F6;
    animation: dot-pulse 1.5s ease-in-out infinite;
}

.app-shell .status-dot-green {
    background: var(--success);
}

@keyframes dot-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ══════════════════════════════════
   HELP BUTTON & MODAL
   ══════════════════════════════════ */
.app-shell .help-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: 1px solid var(--slate-200);
    color: var(--muted);
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 0.75rem;
    font-family: 'Inter', sans-serif;
}

.app-shell .help-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: rgba(46, 117, 182, 0.04);
}

.app-shell .help-btn i {
    font-size: 0.85rem;
}

/* Modal backdrop */
.app-shell .modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(27, 58, 92, 0.5);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

/* Modal content */
.app-shell .modal-content {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 42rem;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-shell .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--slate-200);
    flex-shrink: 0;
    background: none;
    border-radius: 0;
}

.app-shell .modal-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    margin: 0;
    padding: 0;
}

.app-shell .modal-title i {
    color: var(--blue);
    font-size: 1.1rem;
}

.app-shell .modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--slate-400);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    border-radius: 6px;
    transition: all 0.15s;
}

.app-shell .modal-close:hover {
    background: var(--slate-50);
    color: var(--text);
}

.app-shell .modal-body {
    padding: 1.5rem 1.75rem;
    overflow-y: auto;
    flex: 1;
}

/* Guide sections */
.app-shell .guide-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--slate-200);
}

.app-shell .guide-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.app-shell .guide-section h3 {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 0.6rem;
    padding: 0;
    line-height: 1.3;
}

.app-shell .guide-section p {
    font-size: 0.8rem;
    color: var(--text);
    line-height: 1.65;
    margin: 0 0 0.5rem;
}

.app-shell .guide-section ul {
    margin: 0.25rem 0 0;
    padding-left: 1.25rem;
}

.app-shell .guide-section li {
    font-size: 0.8rem;
    color: var(--text);
    line-height: 1.6;
    margin: 0.3rem 0;
}

.app-shell .guide-section strong {
    color: var(--navy);
    font-weight: 700;
}

/* Upload zone descriptions */
.app-shell .guide-zone {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 6px;
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.5rem;
}

.app-shell .guide-zone strong {
    display: block;
    font-size: 0.78rem;
    color: var(--navy);
    margin-bottom: 0.25rem;
}

.app-shell .guide-zone p {
    font-size: 0.75rem;
    margin: 0;
    color: var(--muted);
}

/* FAQ items */
.app-shell .faq-item {
    margin-bottom: 0.75rem;
}

.app-shell .faq-item strong {
    display: block;
    font-size: 0.8rem;
    color: var(--navy);
    margin-bottom: 0.15rem;
}

.app-shell .faq-item p {
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0;
}

/* Modal scrollbar */
.app-shell .modal-body::-webkit-scrollbar {
    width: 5px;
}

.app-shell .modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.app-shell .modal-body::-webkit-scrollbar-thumb {
    background: var(--slate-300);
    border-radius: 3px;
}

/* ══════════════════════════════════
   ALERTS
   ══════════════════════════════════ */
.app-shell .alert {
    margin: 0.5rem 2rem 0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.82rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.app-shell .alert-dismiss {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.5;
    padding: 0 0.25rem;
    line-height: 1;
    flex-shrink: 0;
}

.app-shell .alert-dismiss:hover {
    opacity: 1;
}

.app-shell .alert-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
}

.app-shell .alert-success {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #166534;
}

/* ══════════════════════════════════
   STATE: INPUT — The 4-Zone Grid
   <main> IS the grid directly
   ══════════════════════════════════ */
.app-shell .upload-grid {
    flex: 1 1 0;
    min-height: 0;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1.5rem;
    overflow: hidden;
}

/* Upload cards */
.app-shell .upload-card {
    background: #fff;
    border: 2px dashed var(--slate-300);
    border-radius: 0.75rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    transition: all 0.2s ease;
}

.app-shell .upload-card:hover {
    border-color: var(--orange);
    background: #FFFCF9;
}

/* Zone 3 candidate variant */
.app-shell .upload-card-candidate {
    border-color: #BFDBFE;
}

.app-shell .upload-card-candidate:hover {
    border-color: var(--blue);
}

/* Card header */
.app-shell .card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    flex-shrink: 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
}

.app-shell .card-icon {
    color: var(--navy);
    font-size: 0.9rem;
}

.app-shell .upload-card:hover .card-icon {
    color: var(--orange);
}

.app-shell .card-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: var(--navy);
    text-transform: uppercase;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.app-shell .card-title-blue {
    color: #1D4ED8;
}

.app-shell .file-badge {
    background: var(--navy);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    flex-shrink: 0;
}

/* Card drop zone (inner area) */
.app-shell .card-dropzone {
    flex: 1 1 0;
    min-height: 0;
    border: 2px dotted var(--slate-200);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
    transition: all 0.2s;
}

.app-shell .card-dropzone:hover,
.app-shell .card-dropzone.drop-zone-active {
    border-color: var(--orange);
    background: #FDF0E6;
}

.app-shell .card-dropzone-blue {
    background: rgba(219, 234, 254, 0.15);
}

.app-shell .dropzone-big-icon {
    font-size: 2rem;
    color: var(--slate-300);
    margin-bottom: 0.5rem;
}

.app-shell .dropzone-text {
    font-size: 0.78rem;
    color: var(--muted);
    text-align: center;
    margin: 0 0 0.15rem;
}

.app-shell .dropzone-hint {
    font-size: 0.65rem;
    color: var(--slate-400);
    opacity: 0.7;
    margin-bottom: 0.6rem;
}

.app-shell .dropzone-hint-blue {
    color: var(--blue);
    opacity: 1;
    text-decoration: underline;
}

/* Browse button */
.app-shell .browse-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--navy);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.78rem;
    border: none;
    transition: background 0.2s;
}

.app-shell .browse-btn:hover {
    background: var(--blue);
    color: #fff;
}

.app-shell .browse-btn-sm {
    font-size: 0.72rem;
    padding: 0.3rem 0.7rem;
}

/* File list rows */
.app-shell .file-list {
    width: 100%;
    margin-top: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.app-shell .file-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.5rem;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 4px;
    font-size: 0.72rem;
}

.app-shell .file-row-icon {
    color: var(--blue);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.app-shell .file-row-name {
    flex: 1;
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.app-shell .file-row-size {
    color: var(--slate-400);
    font-size: 0.65rem;
    flex-shrink: 0;
}

.app-shell .file-row-remove {
    background: none;
    border: 1px solid transparent;
    color: #DC2626;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.2rem 0.5rem;
    line-height: 1;
    flex-shrink: 0;
    font-weight: 700;
    border-radius: 4px;
    transition: all 0.15s;
}

.app-shell .file-row-remove:hover {
    color: #fff;
    background: #DC2626;
    border-color: #DC2626;
}

/* Extraction toggle */
.app-shell .extraction-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--success);
    flex-shrink: 0;
}

.app-shell .extraction-check {
    font-size: 0.8rem;
}

.app-shell .extraction-details {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: 0.3rem;
}

.app-shell .extraction-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.68rem;
    color: var(--muted);
    padding: 0.2rem 0.4rem;
    background: var(--slate-50);
    border-radius: 4px;
}

.app-shell .mini-download {
    background: none;
    border: none;
    color: var(--blue);
    cursor: pointer;
    font-size: 0.75rem;
}

.app-shell .mini-download:hover {
    color: var(--navy);
}

/* Supporting docs */
.app-shell .supporting-docs-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.app-shell .supporting-doc-item {
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: 6px;
    padding: 0.5rem;
}

.app-shell .supporting-doc-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--navy);
    margin-bottom: 0.35rem;
}

.app-shell .doc-description {
    width: 100%;
    margin-top: 0.3rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--slate-200);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    resize: vertical;
}

.app-shell .doc-description:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(46, 117, 182, 0.1);
}

/* ══════════════════════════════════
   STATE: PROCESSING
   ══════════════════════════════════ */
.app-shell .state-processing {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.app-shell .processing-card {
    max-width: 40rem;
    width: 100%;
    background: #fff;
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Linear progress bar at top of card */
.app-shell .progress-bar-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--slate-200);
}

.app-shell .progress-bar-fill {
    height: 100%;
    background: var(--orange);
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 2px 2px 0;
    position: relative;
    overflow: hidden;
}

.app-shell .progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Spinning icon */
.app-shell .processing-icon-wrap {
    width: 5rem;
    height: 5rem;
    background: #EFF6FF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    position: relative;
}

.app-shell .processing-icon {
    font-size: 1.75rem;
    color: var(--navy);
    animation: icon-glow 2s ease-in-out infinite;
}

@keyframes icon-glow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.app-shell .processing-icon-ring {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 2px dashed #BFDBFE;
    animation: spin-slow 10s linear infinite;
}

@keyframes spin-slow {
    to { transform: rotate(360deg); }
}

.app-shell .processing-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 0.4rem;
    font-family: 'Inter', sans-serif;
}

.app-shell .processing-subtitle {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0 0 1.75rem;
}

/* Step list */
.app-shell .processing-steps {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    text-align: left;
    max-width: 22rem;
    margin: 0 auto;
}

.app-shell .step {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.88rem;
    font-weight: 500;
}

.app-shell .step-done {
    color: var(--success);
}

.app-shell .step-active {
    color: var(--navy);
    font-weight: 700;
    animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.app-shell .step-pending {
    color: var(--slate-300);
}

.app-shell .step-icon-active {
    color: var(--orange);
}

.app-shell .step-icon-pending {
    font-size: 0.4rem;
    margin-left: 0.15rem;
}

.app-shell .processing-footer {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--slate-50);
    font-size: 0.6rem;
    color: var(--slate-400);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

/* ══════════════════════════════════
   STATE: DELIVERY
   ══════════════════════════════════ */
.app-shell .state-delivery {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    gap: 1rem;
    overflow-y: auto;
}

.app-shell .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--slate-400);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: color 0.2s;
}

.app-shell .back-link:hover {
    color: var(--navy);
}

.app-shell .back-link:hover i {
    transform: translateX(-3px);
}

.app-shell .back-link i {
    transition: transform 0.2s;
}

/* Confirmation bar on delivery page */
.app-shell .confirm-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-size: 0.78rem;
    color: #92400E;
}

.app-shell .confirm-yes {
    background: var(--orange);
    color: #fff;
    border: none;
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.app-shell .confirm-yes:hover {
    background: #C75F00;
}

.app-shell .confirm-no {
    background: none;
    border: 1px solid #FDE68A;
    color: #92400E;
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.app-shell .confirm-no:hover {
    background: #FEF3C7;
}

/* Master card */
.app-shell .report-master-card {
    width: 100%;
    max-width: 40rem;
    background: #fff;
    border-radius: 2rem;
    padding: 2.5rem;
    box-shadow: 0 20px 50px -12px rgba(27, 58, 92, 0.15);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.app-shell .report-accent-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0.5rem;
    background: var(--navy);
}

.app-shell .report-icon-wrap {
    width: 5rem;
    height: 5rem;
    background: var(--slate-50);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    border: 1px solid var(--slate-200);
}

.app-shell .report-icon {
    font-size: 2.25rem;
    color: var(--navy);
}

.app-shell .report-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 0.25rem;
    font-family: 'Inter', sans-serif;
}

.app-shell .report-date {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--slate-400);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin: 0;
}

/* Download grid */
.app-shell .download-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.app-shell .dl-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    padding: 1.5rem 1rem;
    border-radius: 1rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-shell .dl-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: var(--orange);
}

.app-shell .dl-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.app-shell .dl-btn-pdf {
    background: var(--navy);
    color: #fff;
}

.app-shell .dl-btn-docx {
    background: #F1F5F9;
    color: var(--navy);
}

.app-shell .dl-icon {
    font-size: 1.75rem;
    opacity: 0.8;
}

.app-shell .dl-label {
    display: block;
    font-weight: 700;
    font-size: 0.88rem;
}

.app-shell .dl-hint {
    display: block;
    font-size: 0.6rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.app-shell .report-note {
    margin-top: 1.5rem;
    font-size: 0.68rem;
    color: var(--slate-400);
    line-height: 1.6;
    max-width: 24rem;
    margin-left: auto;
    margin-right: auto;
}

/* Preview callout */
.app-shell .preview-callout {
    width: 100%;
    max-width: 40rem;
    background: #E8F4F8;
    border-left: 4px solid var(--blue);
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.app-shell .preview-callout-icon {
    background: #fff;
    padding: 0.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    color: var(--blue);
    flex-shrink: 0;
}

.app-shell .preview-callout-body {
    flex: 1;
    min-width: 0;
}

.app-shell .preview-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: 700;
    color: #1E3A5F;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0;
    margin-bottom: 0.5rem;
}

.app-shell .preview-toggle:hover {
    color: var(--orange);
}

.app-shell .preview-text {
    white-space: pre-wrap;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    color: #1E3A5F;
    line-height: 1.6;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}

/* ══════════════════════════════════
   FOOTER
   ══════════════════════════════════ */
.app-shell .app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 2rem;
    background: #fff;
    border-top: 1px solid var(--slate-200);
    flex-shrink: 0;
    z-index: 10;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.03);
}

.app-shell .footer-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.app-shell .footer-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Toggle switch */
.app-shell .toggle-wrap {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    margin: 0;
}

.app-shell .toggle-track {
    position: relative;
    width: 2.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

.app-shell .toggle-track input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.app-shell .toggle-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--slate-200);
    border-radius: 999px;
    transition: background 0.25s;
}

.app-shell .toggle-dot {
    position: absolute;
    top: 0.25rem;
    left: 0.25rem;
    width: 1rem;
    height: 1rem;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: transform 0.25s;
}

.app-shell .toggle-track input:checked ~ .toggle-bg {
    background: var(--orange);
}

.app-shell .toggle-track input:checked ~ .toggle-dot {
    transform: translateX(1rem);
}

.app-shell .toggle-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.app-shell .toggle-hint {
    font-size: 0.68rem;
    color: var(--slate-400);
    max-width: 200px;
    line-height: 1.3;
    font-style: italic;
}

/* Footer buttons */
.app-shell .footer-clear {
    background: none;
    border: 1px solid var(--slate-200);
    color: var(--muted);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.app-shell .footer-clear:hover {
    border-color: var(--slate-300);
    color: var(--text);
}

.app-shell .footer-generate {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--navy);
    color: #fff;
    padding: 0.65rem 2.25rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 10px 15px -3px rgba(27, 58, 92, 0.2);
    transition: all 0.2s;
}

.app-shell .footer-generate:hover:not(:disabled) {
    background: var(--blue);
}

.app-shell .footer-generate:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.app-shell .footer-hint {
    font-size: 0.72rem;
    color: var(--slate-400);
    font-style: italic;
}

.app-shell .footer-clear-confirm {
    border-color: #DC2626;
    color: #DC2626;
    animation: pulse-border 0.8s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { border-color: #DC2626; }
    50% { border-color: #FECACA; }
}

.app-shell .footer-generate i {
    font-size: 0.65rem;
}

/* ══════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════ */
@media (max-width: 900px) {
    .app-shell .upload-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        overflow-y: auto;
    }

    .app-shell .app-header {
        flex-direction: column;
        gap: 0.3rem;
        padding: 0.5rem 1rem;
    }

    .app-shell .app-footer {
        flex-direction: column;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .app-shell .download-grid {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════
   SCROLLBAR
   ══════════════════════════════════ */
.app-shell .card-dropzone::-webkit-scrollbar,
.app-shell .preview-text::-webkit-scrollbar,
.app-shell .state-delivery::-webkit-scrollbar {
    width: 5px;
}

.app-shell .card-dropzone::-webkit-scrollbar-track,
.app-shell .preview-text::-webkit-scrollbar-track,
.app-shell .state-delivery::-webkit-scrollbar-track {
    background: transparent;
}

.app-shell .card-dropzone::-webkit-scrollbar-thumb,
.app-shell .preview-text::-webkit-scrollbar-thumb,
.app-shell .state-delivery::-webkit-scrollbar-thumb {
    background: var(--slate-300);
    border-radius: 3px;
}
