/* Digital Logbook — Interactive App (TTU brown theme) */
:root {
    --dl-brown: #5D3317;
    --dl-brown-dark: #4a2812;
    --dl-brown-light: #7a4a28;
    --dl-tan: #f5ebe0;
    --dl-peach: #fde8d8;
    --dl-purple-soft: #f0e8f8;
    --dl-green-soft: #e8f5ec;
    --dl-blue-soft: #e8f0fa;
    --dl-orange: #e8913a;
    --dl-green: #4caf50;
    --dl-text: #1a1a1a;
    --dl-muted: #8a8a8a;
    --dl-border: #e8e0d8;
    --dl-bg: #faf8f5;
    --dl-radius: 16px;
    --dl-nav-h: 64px;
    --dl-safe-b: env(safe-area-inset-bottom, 0px);
}

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

html {
    height: 100%;
}

html, body.dl-app-body {
    min-height: 100%;
    min-height: 100dvh;
    margin: 0;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dl-bg);
    color: var(--dl-text);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    flex-direction: column;
}

.dl-demo-bar {
    flex-shrink: 0;
    background: linear-gradient(135deg, #fff8e1, #fff3e0);
    border-bottom: 1px solid rgba(141, 110, 0, 0.12);
    padding: 7px 12px;
    font-size: 0.72rem;
    color: #8d6e00;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    z-index: 10;
}

.dl-demo-bar-link {
    margin-left: auto;
    background: #8d6e00;
    color: #fff;
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

/* Desktop stage + phone wrapper */
.dl-desktop-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.dl-stage-panel {
    display: none;
}

.dl-phone-device {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.dl-phone-frame {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.dl-phone-island,
.dl-phone-bar,
.dl-phone-caption {
    display: none;
}

.dl-phone-screen {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dl-shell {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.dl-viewport {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: var(--dl-bg);
}

.dl-screen {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
}

.dl-screen[hidden] {
    display: none !important;
}

/* ===== LANDING ===== */
.dl-landing {
    padding: 16px 20px 24px;
    text-align: center;
    background: #fff;
}

.dl-uni-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.dl-uni-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}

.dl-uni-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--dl-brown), var(--dl-brown-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
}

.dl-uni-brand span {
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    max-width: 140px;
}

.dl-lang {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--dl-muted);
    border: 1px solid var(--dl-border);
    border-radius: 20px;
    padding: 4px 10px;
}

.dl-hero-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 4px;
}

.dl-hero-title em {
    font-style: normal;
    color: var(--dl-brown);
}

.dl-hero-tag {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--dl-brown);
    margin-bottom: 2px;
}

.dl-hero-sub {
    font-size: 0.78rem;
    color: var(--dl-muted);
    margin-bottom: 16px;
}

.dl-hero-img {
    width: 100%;
    max-width: 340px;
    border-radius: 14px;
    margin: 0 auto 16px;
    display: block;
    box-shadow: 0 8px 24px rgba(93, 51, 23, 0.12);
}

.dl-info-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    background: #fff;
    border: 1px solid var(--dl-border);
    border-radius: var(--dl-radius);
    padding: 14px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.dl-info-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--dl-brown);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.dl-info-card h3 {
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.dl-info-card p {
    font-size: 0.78rem;
    color: var(--dl-muted);
    line-height: 1.45;
}

.dl-btn-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.dl-btn-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--dl-border);
    background: #fff;
    color: var(--dl-brown);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s;
}

.dl-btn-circle:active { transform: scale(0.94); }

.dl-btn-primary {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    background: var(--dl-brown);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.dl-btn-primary:active {
    transform: scale(0.98);
    background: var(--dl-brown-dark);
}

.dl-btn-outline {
    width: 100%;
    padding: 13px 20px;
    border: 2px solid var(--dl-brown);
    border-radius: 50px;
    background: transparent;
    color: var(--dl-brown);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.dl-btn-outline:active { background: var(--dl-tan); }

.dl-footer-copy {
    font-size: 0.68rem;
    color: var(--dl-muted);
    margin-top: 16px;
}

/* ===== LOGIN ===== */
.dl-login {
    padding: 24px 22px;
    background: #fff;
    min-height: 100%;
}

.dl-login-head {
    text-align: center;
    margin-bottom: 28px;
}

.dl-login-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--dl-brown), var(--dl-brown-light));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.dl-login-head h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.dl-login-head p {
    font-size: 0.85rem;
    color: var(--dl-muted);
}

.dl-role-tabs {
    display: flex;
    background: #f3f0ec;
    border-radius: 50px;
    padding: 4px;
    margin-bottom: 24px;
}

.dl-role-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border: none;
    border-radius: 50px;
    background: transparent;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--dl-muted);
    cursor: pointer;
    transition: all 0.25s ease;
}

.dl-role-tab.active {
    background: var(--dl-brown);
    color: #fff;
    box-shadow: 0 2px 8px rgba(93, 51, 23, 0.25);
}

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

.dl-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.dl-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px solid var(--dl-border);
    border-radius: 14px;
    padding: 0 14px;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dl-input-wrap:focus-within {
    border-color: var(--dl-brown);
    box-shadow: 0 0 0 3px rgba(93, 51, 23, 0.1);
    background: #fff;
}

.dl-input-wrap.valid {
    border-color: var(--dl-green);
}

.dl-input-wrap i:first-child {
    color: var(--dl-brown);
    font-size: 1rem;
}

.dl-input-wrap input {
    flex: 1;
    border: none;
    background: none;
    padding: 14px 0;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
}

.dl-input-action {
    border: none;
    background: none;
    color: var(--dl-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
}

.dl-check-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 0.82rem;
}

.dl-check-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dl-brown);
    font-weight: 500;
    cursor: pointer;
}

.dl-check-row input[type="checkbox"] {
    accent-color: var(--dl-brown);
    width: 16px;
    height: 16px;
}

.dl-check-row a {
    color: var(--dl-brown);
    font-weight: 600;
    text-decoration: none;
}

.dl-signin-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 14px;
    background: var(--dl-brown);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, background 0.2s;
}

.dl-signin-btn:active {
    transform: scale(0.98);
    background: var(--dl-brown-dark);
}

.dl-signin-btn.loading {
    opacity: 0.85;
    pointer-events: none;
}

.dl-trust {
    text-align: center;
    margin-top: 20px;
    font-size: 0.72rem;
    color: var(--dl-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.dl-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--dl-muted);
    font-size: 0.82rem;
    border: none;
    background: none;
    cursor: pointer;
    margin-bottom: 16px;
    padding: 0;
    font-family: inherit;
}

/* ===== DASHBOARD ===== */
.dl-dash {
    padding: 16px 18px;
    background: var(--dl-bg);
}

.dl-dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.dl-user-block {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dl-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--dl-tan);
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dl-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dl-brown);
    font-size: 1.2rem;
}

.dl-user-block h2 {
    font-size: 1rem;
    font-weight: 700;
}

.dl-user-block p {
    font-size: 0.72rem;
    color: var(--dl-muted);
}

.dl-notif-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--dl-border);
    background: #fff;
    color: var(--dl-text);
    font-size: 1.1rem;
    cursor: pointer;
}

.dl-notif-btn::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #e53935;
    border-radius: 50%;
    border: 2px solid #fff;
}

.dl-progress-card {
    background: linear-gradient(135deg, var(--dl-brown) 0%, #7a4520 100%);
    border-radius: 18px;
    padding: 18px;
    color: #fff;
    margin-bottom: 18px;
    box-shadow: 0 6px 20px rgba(93, 51, 23, 0.3);
    position: relative;
    overflow: hidden;
}

.dl-progress-card h3 {
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 2px;
}

.dl-progress-card .dl-progress-sub {
    font-size: 0.72rem;
    opacity: 0.75;
    margin-bottom: 12px;
}

.dl-progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dl-progress-bar-wrap {
    flex: 1;
}

.dl-progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.25);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.dl-progress-fill {
    height: 100%;
    background: var(--dl-orange);
    border-radius: 4px;
    width: 0;
    transition: width 1.2s cubic-bezier(0.32, 0.72, 0, 1);
}

.dl-progress-card.active .dl-progress-fill {
    width: var(--progress, 68%);
}

.dl-progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    opacity: 0.9;
}

.dl-progress-pct {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
}

.dl-progress-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.dl-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.dl-action-card {
    border: none;
    border-radius: 18px;
    padding: 16px 14px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    transition: transform 0.2s ease;
    min-height: 110px;
}

.dl-action-card:active { transform: scale(0.97); }

.dl-action-card--peach { background: var(--dl-peach); }
.dl-action-card--purple { background: var(--dl-purple-soft); }
.dl-action-card--green { background: var(--dl-green-soft); }
.dl-action-card--blue { background: var(--dl-blue-soft); }

.dl-action-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.dl-action-card--peach .dl-action-icon { background: var(--dl-brown); color: #fff; }
.dl-action-card--purple .dl-action-icon { background: #9c6bd6; color: #fff; }
.dl-action-card--green .dl-action-icon { background: var(--dl-green); color: #fff; }
.dl-action-card--blue .dl-action-icon { background: #5b8def; color: #fff; }

.dl-action-card strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.dl-action-card span {
    font-size: 0.72rem;
    color: var(--dl-muted);
}

.dl-action-arrow {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 0.85rem;
    opacity: 0.5;
}

.dl-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.dl-section-head h3 {
    font-size: 0.95rem;
    font-weight: 700;
}

.dl-section-head a {
    font-size: 0.78rem;
    color: var(--dl-brown);
    font-weight: 600;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

.dl-activity-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid var(--dl-border);
    cursor: pointer;
    text-align: left;
    width: 100%;
    font-family: inherit;
    transition: transform 0.2s;
}

.dl-activity-card:active { transform: scale(0.98); }

.dl-activity-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.dl-activity-body { flex: 1; min-width: 0; }

.dl-activity-body strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.dl-activity-body span {
    font-size: 0.72rem;
    color: var(--dl-muted);
}

.dl-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.dl-badge--approved { background: #e8f5e9; color: #2e7d32; }
.dl-badge--pending { background: #fff3e0; color: #e65100; }

.dl-org-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--dl-border);
    border-radius: 50px;
    padding: 6px 12px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--dl-brown);
    margin: 0 18px 12px;
}

.dl-org-chip i { font-size: 0.85rem; }

.dl-activity-icon--approved { background: #e8f5e9; color: #4caf50; }
.dl-activity-icon--pending { background: #fff3e0; color: #e65100; }

/* ===== PAGE SCREENS (entries, reports, profile) ===== */
.dl-page {
    padding: 16px 18px 24px;
    min-height: 100%;
}

.dl-page-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.dl-page-head h2 {
    font-size: 1.1rem;
    font-weight: 700;
}

.dl-page-head p {
    font-size: 0.72rem;
    color: var(--dl-muted);
}

.dl-page-head .dl-badge {
    margin-left: auto;
    flex-shrink: 0;
}

.dl-entries-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dl-entry-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--dl-border);
    border-radius: 14px;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.2s;
}

.dl-entry-row:active { transform: scale(0.98); }

.dl-entry-row-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--dl-green-soft);
    color: var(--dl-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.dl-entry-row-body {
    flex: 1;
    min-width: 0;
}

.dl-entry-row-body strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.dl-entry-row-body span {
    font-size: 0.72rem;
    color: var(--dl-muted);
}

.dl-entry-row > .bi-chevron-right {
    color: #ccc;
    font-size: 0.85rem;
}

.dl-detail-card {
    background: #fff;
    border-radius: var(--dl-radius);
    padding: 18px;
    border: 1px solid var(--dl-border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.dl-detail-card h4 {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--dl-brown);
    margin-bottom: 8px;
}

.dl-detail-card p {
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--dl-text);
}

.dl-detail-byline {
    font-size: 0.78rem !important;
    color: var(--dl-muted) !important;
    margin-top: 10px;
    font-style: italic;
}

.dl-detail-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--dl-border);
}

.dl-detail-meta small {
    display: block;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--dl-muted);
    margin-bottom: 2px;
}

.dl-detail-meta strong {
    font-size: 0.78rem;
    font-weight: 600;
}

.dl-score-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.dl-score-card {
    background: #fff;
    border: 1px solid var(--dl-border);
    border-radius: 14px;
    padding: 14px;
    text-align: center;
}

.dl-score-card span {
    display: block;
    font-size: 0.68rem;
    color: var(--dl-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.dl-score-card strong {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--dl-brown);
}

.dl-score-card--main {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--dl-brown), #7a4520);
    border: none;
    color: #fff;
}

.dl-score-card--main span { color: rgba(255,255,255,0.75); }
.dl-score-card--main strong { color: #fff; font-size: 1.6rem; }

.dl-profile-card {
    text-align: center;
    background: #fff;
    border-radius: var(--dl-radius);
    padding: 24px 18px;
    margin-bottom: 16px;
    border: 1px solid var(--dl-border);
}

.dl-profile-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 3px solid var(--dl-tan);
}

.dl-profile-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.dl-profile-card p {
    font-size: 0.78rem;
    color: var(--dl-muted);
}

.dl-info-list {
    background: #fff;
    border-radius: var(--dl-radius);
    border: 1px solid var(--dl-border);
    overflow: hidden;
}

.dl-info-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--dl-border);
    font-size: 0.82rem;
}

.dl-info-row:last-child { border-bottom: none; }

.dl-info-row span { color: var(--dl-muted); flex-shrink: 0; }
.dl-info-row strong { text-align: right; font-weight: 600; }

.dl-select {
    flex: 1;
    border: none;
    background: none;
    padding: 14px 0;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
}

.dl-form-card textarea {
    width: 100%;
    border: 1.5px solid var(--dl-border);
    border-radius: 12px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 0.88rem;
    resize: vertical;
    min-height: 100px;
    outline: none;
    transition: border-color 0.2s;
}

.dl-form-card textarea:focus { border-color: var(--dl-brown); }

.dl-upload-zone small {
    display: block;
    color: #aaa;
    font-size: 0.72rem;
    margin-top: 4px;
}

/* ===== ADD ENTRY WIZARD ===== */
.dl-entry {
    padding: 0 0 24px;
    background: var(--dl-bg);
    min-height: 100%;
}

.dl-entry-top {
    background: #fff;
    padding: 12px 18px 16px;
    border-bottom: 1px solid var(--dl-border);
    position: sticky;
    top: 0;
    z-index: 5;
}

.dl-entry-top-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.dl-entry-back {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--dl-border);
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.dl-entry-top h2 {
    flex: 1;
    font-size: 1rem;
    font-weight: 700;
}

.dl-entry-top p {
    font-size: 0.72rem;
    color: var(--dl-muted);
}

.dl-entry-book-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--dl-brown);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dl-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.dl-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    position: relative;
}

.dl-step::after {
    content: '';
    position: absolute;
    top: 14px;
    left: calc(50% + 16px);
    width: calc(100% - 32px);
    height: 2px;
    background: var(--dl-border);
    z-index: 0;
}

.dl-step:last-child::after { display: none; }

.dl-step.done::after { background: var(--dl-brown); }

.dl-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--dl-border);
    color: var(--dl-muted);
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.dl-step.active .dl-step-num,
.dl-step.done .dl-step-num {
    background: var(--dl-brown);
    color: #fff;
}

.dl-step-label {
    font-size: 0.62rem;
    color: var(--dl-muted);
    font-weight: 600;
}

.dl-step.active .dl-step-label { color: var(--dl-brown); }

.dl-entry-form {
    padding: 16px 18px;
}

.dl-form-card {
    background: #fff;
    border-radius: var(--dl-radius);
    padding: 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.dl-form-step {
    display: none;
    animation: dlFadeIn 0.35s ease;
}

.dl-form-step.active { display: block; }

@keyframes dlFadeIn {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: none; }
}

.dl-form-card .dl-field label {
    font-size: 0.78rem;
    color: var(--dl-text);
}

.dl-form-card textarea {
    width: 100%;
    border: 1.5px solid var(--dl-border);
    border-radius: 12px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 0.88rem;
    resize: vertical;
    min-height: 100px;
    outline: none;
    transition: border-color 0.2s;
}

.dl-form-card textarea:focus { border-color: var(--dl-brown); }

.dl-char-count {
    text-align: right;
    font-size: 0.68rem;
    color: var(--dl-muted);
    margin-top: 4px;
}

.dl-upload-zone {
    border: 2px dashed var(--dl-border);
    border-radius: 14px;
    padding: 28px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.dl-upload-zone:hover,
.dl-upload-zone.drag-over {
    border-color: var(--dl-brown);
    background: var(--dl-tan);
}

.dl-upload-zone i {
    font-size: 2rem;
    color: var(--dl-brown);
    margin-bottom: 8px;
}

.dl-upload-zone p {
    font-size: 0.82rem;
    color: var(--dl-muted);
}

.dl-review-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--dl-border);
}

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

.dl-review-item small {
    display: block;
    font-size: 0.68rem;
    color: var(--dl-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.dl-review-item strong {
    font-size: 0.88rem;
    font-weight: 600;
}

.dl-form-nav {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.dl-form-nav .dl-btn-primary,
.dl-form-nav .dl-btn-outline {
    flex: 1;
    border-radius: 14px;
    padding: 14px;
    font-size: 0.88rem;
}

/* ===== BOTTOM NAV ===== */
.dl-bottom-nav {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #fff;
    border-top: 1px solid var(--dl-border);
    padding: 6px 8px calc(6px + var(--dl-safe-b));
    z-index: 50;
}

.dl-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 4px;
    border: none;
    background: none;
    color: var(--dl-muted);
    font-size: 0.62rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    transition: color 0.2s;
}

.dl-nav-item i { font-size: 1.2rem; }

.dl-nav-item.active {
    color: var(--dl-brown);
}

.dl-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 20px;
    height: 3px;
    background: var(--dl-brown);
    border-radius: 2px;
}

/* ===== TOAST ===== */
.dl-toast {
    position: fixed;
    bottom: calc(var(--dl-nav-h) + var(--dl-safe-b) + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--dl-brown);
    color: #fff;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
    z-index: 600;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    pointer-events: none;
}

.dl-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ===== QR MODAL ===== */
.dl-qr-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(6px);
    z-index: 550;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.dl-qr-overlay.open {
    opacity: 1;
    visibility: visible;
}

.dl-qr-modal {
    background: #fff;
    border-radius: 20px;
    padding: 28px 24px;
    text-align: center;
    max-width: 300px;
    width: 100%;
    transform: scale(0.9);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.dl-qr-overlay.open .dl-qr-modal {
    transform: scale(1);
}

.dl-qr-scanner {
    width: 180px;
    height: 180px;
    margin: 0 auto 16px;
    border: 3px solid var(--dl-brown);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    background: #111;
}

.dl-qr-scanner::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--dl-orange);
    box-shadow: 0 0 12px var(--dl-orange);
    animation: dlScan 2s ease-in-out infinite;
}

@keyframes dlScan {
    0%, 100% { top: 10%; }
    50% { top: 85%; }
}

.dl-qr-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 20px;
    opacity: 0.3;
}

.dl-qr-grid span {
    aspect-ratio: 1;
    background: #fff;
    border-radius: 1px;
}

.dl-qr-grid span.filled { background: #ccc; }

/* ===== SUCCESS OVERLAY ===== */
.dl-success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.92);
    z-index: 560;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.dl-success-overlay.open {
    opacity: 1;
    visibility: visible;
}

.dl-success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--dl-green-soft);
    color: var(--dl-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 16px;
    animation: dlPop 0.5s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes dlPop {
    0% { transform: scale(0); }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.dl-success-overlay h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.dl-success-overlay p {
    font-size: 0.85rem;
    color: var(--dl-muted);
}

@media (min-width: 900px) {
    html, body.dl-app-body {
        overflow: auto;
        background:
            radial-gradient(ellipse 80% 60% at 20% 20%, rgba(93, 51, 23, 0.08) 0%, transparent 50%),
            radial-gradient(ellipse 60% 50% at 80% 80%, rgba(45, 138, 78, 0.06) 0%, transparent 50%),
            linear-gradient(160deg, #ece8e2 0%, #f5f2ed 40%, #e8e4dc 100%);
    }

    .dl-demo-bar {
        position: relative;
        padding: 10px 24px;
        justify-content: center;
        max-width: 1200px;
        margin: 0 auto;
        width: 100%;
        background: rgba(255, 248, 225, 0.92);
        backdrop-filter: blur(8px);
    }

    .dl-demo-bar-link {
        position: absolute;
        right: 24px;
    }

    .dl-desktop-wrap {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 56px;
        max-width: 1200px;
        margin: 0 auto;
        padding: 36px 32px 48px;
        width: 100%;
        min-height: calc(100vh - 42px);
    }

    .dl-stage-panel {
        display: flex;
        flex-direction: column;
        flex: 0 1 400px;
        padding: 12px 0;
    }

    .dl-stage-badge {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: var(--dl-brown);
        color: #fff;
        font-size: 0.72rem;
        font-weight: 700;
        padding: 6px 14px;
        border-radius: 50px;
        width: fit-content;
        margin-bottom: 20px;
        text-transform: uppercase;
        letter-spacing: 0.4px;
    }

    .dl-stage-title {
        font-size: 2.4rem;
        font-weight: 800;
        line-height: 1.1;
        color: var(--dl-brown);
        margin-bottom: 16px;
        letter-spacing: -0.02em;
    }

    .dl-stage-lead {
        font-size: 0.95rem;
        line-height: 1.6;
        color: #5a5348;
        margin-bottom: 24px;
    }

    .dl-stage-features {
        list-style: none;
        margin-bottom: 28px;
    }

    .dl-stage-features li {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 0.88rem;
        color: var(--dl-text);
        padding: 8px 0;
        font-weight: 500;
    }

    .dl-stage-features li i {
        color: var(--dl-green);
        font-size: 1.1rem;
        flex-shrink: 0;
    }

    .dl-stage-hint {
        font-size: 0.82rem;
        color: var(--dl-muted);
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 14px 16px;
        background: rgba(255,255,255,0.7);
        border-radius: 12px;
        border: 1px solid var(--dl-border);
        margin-bottom: 20px;
    }

    .dl-stage-back {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: var(--dl-brown);
        font-weight: 600;
        font-size: 0.88rem;
        text-decoration: none;
        width: fit-content;
    }

    .dl-stage-back:hover {
        text-decoration: underline;
    }

    .dl-phone-device {
        flex: 0 0 auto;
        align-items: center;
    }

    .dl-phone-frame {
        width: 390px;
        height: min(820px, calc(100vh - 120px));
        flex: none;
        display: flex;
        flex-direction: column;
        background: linear-gradient(145deg, #2a2a2a 0%, #1a1a1a 50%, #0d0d0d 100%);
        border-radius: 52px;
        padding: 14px;
        box-shadow:
            0 0 0 1px rgba(255,255,255,0.08),
            0 2px 4px rgba(0,0,0,0.2),
            0 24px 48px rgba(0,0,0,0.35),
            0 48px 96px rgba(0,0,0,0.2),
            inset 0 1px 0 rgba(255,255,255,0.06);
        position: relative;
    }

    .dl-phone-island {
        display: block;
        position: absolute;
        top: 18px;
        left: 50%;
        transform: translateX(-50%);
        width: 126px;
        height: 34px;
        background: #0d0d0d;
        border-radius: 20px;
        z-index: 30;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
    }

    .dl-phone-screen {
        flex: 1 1 auto;
        min-height: 0;
        border-radius: 40px;
        overflow: hidden;
        background: #000;
        box-shadow: inset 0 0 0 1px rgba(0,0,0,0.5);
    }

    .dl-phone-bar {
        display: block;
        width: 128px;
        height: 5px;
        background: rgba(255,255,255,0.25);
        border-radius: 3px;
        margin: 10px auto 0;
    }

    .dl-phone-caption {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin-top: 16px;
        font-size: 0.78rem;
        color: #7a7268;
        font-weight: 600;
    }

    .dl-shell {
        border-radius: 40px;
    }

    /* Contain modals & toast inside the phone screen */
    .dl-phone-screen .dl-qr-overlay,
    .dl-phone-screen .dl-success-overlay {
        position: absolute;
        inset: 0;
        border-radius: 40px;
    }

    .dl-phone-screen .dl-toast {
        position: absolute;
        left: 50%;
        bottom: calc(var(--dl-nav-h) + 12px);
        transform: translateX(-50%) translateY(20px);
    }

    .dl-phone-screen .dl-toast.show {
        transform: translateX(-50%) translateY(0);
    }
}
