/* 03-layout.css — Shell aplikasi: #mainApp, header, logo, badge header, profil user, tab navigasi, panel.
   Diekstrak apa adanya dari index.html baris 279-490 (commit 4734b5c).
   URUTAN MUAT PENTING: prefix angka menentukan urutan <link>. Jangan ditukar —
   beberapa selektor sengaja didefinisikan ulang dan bergantung pada urutan ini.
   Lihat docs/DECISIONS.md K-5. */

/* ========== MAIN APP STYLES ========== */
#mainApp {
    display: none;
}
#mainApp.visible {
    display: block;
}

.app-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-radius: 2.8rem;
    padding: 1.8rem 2rem 2rem;
    box-shadow: 0 30px 60px -15px rgba(180, 40, 40, 0.15), 0 0 0 1px rgba(255, 200, 200, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.app-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0e0e0;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* Logo perusahaan (src/asset/company_logo.png, latar transparan) menggantikan
   ikon helm. Tinggi sama dengan ikon lama; lebar mengikuti rasio aspek asli. */
.logo-company {
    display: block;
    height: 48px;
    width: auto;
    flex-shrink: 0;
}

.logo-text {
    font-weight: 700;
    font-size: 1.8rem;
    color: #b31b1b;
}

.logo-text span {
    color: #d42a2a;
    font-weight: 300;
}

.logo-sub {
    font-size: 0.7rem;
    font-weight: 500;
    color: #8a5a5a;
    letter-spacing: 1px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}

/* .header-badge (lonceng notifikasi — hitungannya selalu 0, tidak pernah
   berfungsi) dan wadah pill .user-profile dihapus. Badge jam & status Online
   sudah lebih dulu dihapus, lihat docs/DECISIONS.md K-6. (Titik status
   kalender memakai .cal-dot di 09-calendar.css — selektor lain.) */

/* Identitas login: avatar, nama dengan role di bawahnya, tombol keluar.
   Sengaja tanpa wadah pill/kartu — hierarkinya cukup dari tipografi. */
.header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    max-width: 100%;
}

.header-avatar {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #f6e7e7;
    color: #9c1c1c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
}

.header-identity {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}

/* Nama dan role tidak pernah membuat header meluap: teks yang terlalu
   panjang (mis. nama plant) dipotong dengan elipsis; teks utuh ada di title. */
.header-user-name,
.header-user-role {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-user-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: #3a2020;
}

.header-user-role {
    font-weight: 500;
    font-size: 0.75rem;
    color: #8a5a5a;
}

.header-logout {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    margin-left: 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ead6d6;
    border-radius: 8px;
    background: transparent;
    color: #8a3a3a;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.header-logout:hover {
    background: #fbefef;
    border-color: #e0c2c2;
    color: #b31b1b;
}

.header-logout:focus-visible {
    outline: 2px solid #d42a2a;
    outline-offset: 2px;
}

.nav-tabs {
    display: flex;
    gap: 0.3rem;
    background: rgba(255, 240, 240, 0.5);
    padding: 0.4rem;
    border-radius: 60px;
    margin-bottom: 2rem;
    border: 1px solid rgba(212, 42, 42, 0.08);
    flex-wrap: wrap;
}

.nav-tab {
    padding: 0.6rem 1.4rem;
    border: none;
    background: transparent;
    border-radius: 60px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #7a4a4a;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.nav-tab i {
    color: #b34a4a;
}

.nav-tab.active {
    background: #d42a2a;
    color: white;
    box-shadow: 0 8px 18px -8px rgba(200, 40, 40, 0.35);
}

.nav-tab.active i {
    color: white;
}

.nav-tab:hover:not(.active) {
    background: rgba(255, 200, 200, 0.3);
}

.panel {
    display: none;
    animation: fadePanel 0.25s ease;
}

.panel.active {
    display: block;
}

@keyframes fadePanel {
    0% {
        opacity: 0.5;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

