/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #111827;
    background: #F5F8FC;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ===== Utilities ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* ===== Cards ===== */
.card {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: box-shadow 200ms, transform 200ms;
}

.card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 200ms, transform 150ms, box-shadow 200ms;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: #113A7D;
    color: #fff;
}
.btn-primary:hover {
    background: #0B1C3F;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #E8EFF8;
    color: #113A7D;
}
.btn-secondary:hover {
    background: #D1DDEF;
}

.btn-accent {
    background: #2CC7D1;
    color: #fff;
}
.btn-accent:hover {
    background: #24B0B9;
}

.btn-full { width: 100%; }

/* ===== Form inputs ===== */
input, select, textarea {
    font-family: inherit;
    font-size: 1rem;
}

/* ===== Layout: App Shell ===== */
.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #fff;
    border-bottom: 1px solid #E8EFF8;
    min-height: 56px;
}

.app-header__left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-header__logo {
    height: 32px;
    width: auto;
}

.app-header__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0B1C3F;
}

.app-header__user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #5A6A85;
}

.app-header__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #113A7D;
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.app-content {
    flex: 1;
    padding: 20px;
    padding-bottom: 80px; /* space for bottom nav */
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

/* ===== Bottom Navigation ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: #fff;
    border-top: 1px solid #E8EFF8;
    padding: 6px 0;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
}

.bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    border: none;
    background: none;
    cursor: pointer;
    color: #8896AB;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    transition: color 200ms;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav__item.active,
.bottom-nav__item:hover {
    color: #113A7D;
}

.bottom-nav__item svg {
    width: 22px;
    height: 22px;
}

/* ===== Page sections ===== */
.page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0B1C3F;
    margin-bottom: 20px;
}

.section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #8896AB;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* ===== Quick action cards ===== */
.quick-cards {
    display: grid;
    gap: 14px;
}

.quick-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 200ms, transform 200ms;
    -webkit-tap-highlight-color: transparent;
}

.quick-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

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

.quick-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.quick-card__icon svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
}

.quick-card__icon--docs { background: linear-gradient(135deg, #113A7D, #2563EB); }
.quick-card__icon--chat { background: linear-gradient(135deg, #2CC7D1, #06B6D4); }
.quick-card__icon--stats { background: linear-gradient(135deg, #8B5CF6, #7C3AED); }
.quick-card__icon--profile { background: linear-gradient(135deg, #F59E0B, #D97706); }

.quick-card__text {
    flex: 1;
    min-width: 0;
}

.quick-card__title {
    font-weight: 700;
    font-size: 1rem;
    color: #0B1C3F;
}

.quick-card__desc {
    font-size: 0.82rem;
    color: #5A6A85;
    margin-top: 2px;
}

.quick-card__arrow {
    color: #C4D0E0;
    flex-shrink: 0;
}

.quick-card__arrow svg {
    width: 18px;
    height: 18px;
}

/* ===== Responsive ===== */
@media (min-width: 768px) {
    .app-content {
        max-width: 640px;
        padding: 32px 24px;
        padding-bottom: 80px;
    }

    .quick-cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .bottom-nav {
        max-width: 640px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    }
}
