/* DentFlow — 팀(기공) 앱 상단 네비게이션 (core/base.html) */

/* 브라우저 기본 body margin(8px) 때문에 헤더·하단선이 화면 끝까지 안 닿는 현상 방지 */
html,
body {
    margin: 0;
    padding: 0;
}

.df-app-header {
    width: 100%;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 200;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.df-app-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 56px;
}

.df-app-nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #0f172a;
    font-weight: 700;
    font-size: 1.0625rem;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.df-app-nav__brand:hover {
    color: #1d4ed8;
}

.df-app-nav__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.df-app-nav__links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.df-app-nav__link {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.df-app-nav__link:hover {
    background-color: #f1f5f9;
    color: #1e293b;
}

.df-app-nav__link--active {
    background-color: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}

.df-app-nav__aside {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.df-app-nav__user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 280px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.3;
}

.df-app-nav__user-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 160px;
    color: #334155;
    font-weight: 500;
}

.df-app-nav__user-team {
    color: #64748b;
    white-space: nowrap;
}

.df-app-nav__user-team::before {
    content: "·";
    margin: 0 4px;
    color: #cbd5e1;
}

.df-app-nav__btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.df-app-nav__btn--primary {
    background: #2563eb;
    color: #fff;
    border: 1px solid #2563eb;
}

.df-app-nav__btn--primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.df-app-nav__btn--ghost {
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.df-app-nav__btn--ghost:hover {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.df-app-nav--guest .df-app-nav__links {
    justify-content: flex-end;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 8px;
}

/* ── 고객 포털 (customer/base.html) — 녹색 액센트 ── */

.df-app-header--customer .df-app-nav__brand:hover {
    color: #2e7d32;
}

.df-app-header--customer .df-app-nav__logo {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
}

.df-app-header--customer .df-app-nav__link:hover {
    background-color: #f1f8f4;
    color: #1b5e20;
}

.df-app-header--customer .df-app-nav__link--active {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.df-app-header--customer .df-app-nav__btn--primary {
    background: #2e7d32;
    border-color: #2e7d32;
}

.df-app-header--customer .df-app-nav__btn--primary:hover {
    background: #1b5e20;
    border-color: #1b5e20;
}

.df-app-nav__brand-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #2e7d32;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
}

.df-app-messages {
    max-width: 720px;
    margin: 12px auto 0;
    padding: 0 20px;
}

.df-app-message {
    padding: 10px 14px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 0.875rem;
}

.df-app-message--success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.df-app-message--error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.df-app-message--info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

@media (max-width: 900px) {
    .df-app-nav {
        flex-wrap: wrap;
        padding: 12px 16px;
        min-height: auto;
    }

    .df-app-nav__links {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        padding-top: 4px;
        border-top: 1px solid #f1f5f9;
    }

    .df-app-header--customer .df-app-nav__links {
        border-top-color: #e8f5e9;
    }

    .df-app-nav__user-team {
        display: none;
    }

    .df-app-nav__user-email {
        max-width: 120px;
    }

    /* 게스트(로그인/회원가입) 네비는 모바일에서도 한 줄 유지 — 아랫줄로 내리지 않음 */
    .df-app-nav--guest {
        flex-wrap: nowrap;
    }

    .df-app-nav--guest .df-app-nav__links {
        order: 0;
        width: auto;
        padding-top: 0;
        border-top: none;
        justify-content: flex-end;
    }
}

/* 아주 좁은 화면: 버튼/브랜드 간격을 줄여 한 줄에 들어오게 */
@media (max-width: 420px) {
    .df-app-nav--guest {
        gap: 8px;
        padding: 10px 14px;
    }

    .df-app-nav--guest .df-app-nav__btn {
        padding: 7px 11px;
    }
}
