/* ============================================
   FPT Web Push - Base Styles
   Variables, Reset, Layout, Sidebar, Main Content
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@100;200;300;400;500;600;700;800;900&display=swap');

:root {
    --primary-color: #01297A;
    --primary-light: #034EA2;
    --primary-active: #325293;
    --accent-color: #034EA2;
    --sidebar-collapsed-width: 64px;
    --sidebar-width: 240px;
    --header-height: 48px;
    --danger-color: #ff4d4f;
    --bg-color: #F8F9FC;
    --bg-secondary: #FAFBFC;
    --text-color: #1e293b;
    --text-heading: #13234F;
    --text-secondary: #64646D;
    --text-muted: #9BB2C7;
    --border-color: #E9EAEB;
    --border-strong: #D0D5DD;
    --border-medium: #D5D7DA;
    --success-color: #16a34a;
    --success-bg: #ECFDF3;
    --success-text: #23745C;
    --inactive-bg: #F2F4F7;
    --inactive-text: #5C6075;
    --error-color: #ff4d4f;
    --warning-color: #faad14;
    --card-radius: 12px;
    --pill-radius: 9999px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;

/* Import phần tách nhỏ hơn 400 dòng */
@import url('./base-part2.css');
}
body {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    font-size: 14px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Archivo', ui-sans-serif, system-ui, sans-serif;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ============================================
   Layout
   ============================================ */
.app-container {
    display: flex;
    min-height: 100vh;
    background: var(--primary-color);
}

/* ============================================
   Sidebar
   ============================================ */

/* ── Logo ── */
.logo-area {
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    transition: gap 0.3s ease, padding 0.3s ease;
}

.sidebar:hover .logo-area {
    justify-content: flex-start;
    gap: 12px;
    padding: 0 4px;
}

.fpt-logo-box {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fpt-logo-box img {
    width: 100%;
    height: auto;
}

.logo-text {
    color: white;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.2s ease, width 0.3s ease;
}

.sidebar:hover .logo-text {
    opacity: 1;
    width: auto;
}

/* ── Navigation ── */
.sidebar {
    width: var(--sidebar-collapsed-width);
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 20px 10px 16px;
    position: fixed;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.3s ease, padding 0.3s ease;
}

.sidebar:hover {
    width: var(--sidebar-width);
    padding: 20px 16px 16px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    flex: 1;
}

.nav-section {
    margin-bottom: 16px;
}

.nav-section-title {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    opacity: 0;
    height: 0;
    overflow: hidden;
    padding: 0 12px;
    margin: 0;
    transition: opacity 0.2s ease, height 0.2s ease, padding 0.2s ease, margin 0.2s ease;
}

.sidebar:hover .nav-section-title {
    opacity: 1;
    height: auto;
    padding: 8px 12px 4px;
    margin-bottom: 4px;
}

.nav-item {
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0;
    gap: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
    list-style: none;
}

.sidebar:hover .nav-item {
    padding: 0 12px;
    gap: 12px;
}

.nav-item i {
    font-size: 18px;
    width: 100%;
    text-align: center;
    flex-shrink: 0;
    transition: width 0.3s ease;
    color: #fff;
}

.sidebar:hover .nav-item i {
    width: 22px;
}

.nav-item-label {
    flex: 1;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.2s ease, width 0.3s ease;
}

.sidebar:hover .nav-item-label {
    opacity: 1;
    width: auto;
}

.nav-item:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    background-color: rgba(255, 255, 255, 0.16);
    color: white;
    font-weight: 600;
}

/* ── Expandable submenu ── */
.nav-expand { position: relative; }
.nav-expand-arrow {
    font-size: 10px;
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.2s, width 0.2s, transform 0.2s;
    margin-left: auto;
}
.sidebar:hover .nav-expand-arrow { opacity: 0.6; width: 14px; }
.nav-expand.open > .nav-item .nav-expand-arrow { transform: rotate(180deg); }
.nav-submenu { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.nav-expand.open .nav-submenu { max-height: 200px; }
.nav-submenu .nav-item { height: 34px; font-size: 13px; padding-left: 0; }
.sidebar:hover .nav-submenu .nav-item { padding-left: 36px; }
.nav-submenu .nav-item-label { font-weight: 400; }
.sidebar:hover .nav-submenu .nav-expand > .nav-item { padding-left: 36px; }
.sidebar:hover .nav-submenu .nav-expand .nav-submenu .nav-item { padding-left: 48px; }
.nav-submenu .nav-expand.open > .nav-submenu { max-height: 150px; }

/* ── Sidebar badge ── */
.sidebar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.85);
    font-size: 11px;
    font-weight: 600;
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.sidebar:hover .sidebar-badge { opacity: 1; }

/* ── Beta badge ── */
.beta-badge-wrapper { white-space: nowrap; opacity: 0; transition: opacity 0.2s ease; }
.sidebar:hover .beta-badge-wrapper { opacity: 1; }
.beta-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

/* ── Footer ── */
.sidebar-footer {
    margin-top: auto;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transition: gap 0.3s ease, padding 0.3s ease;
}

.sidebar:hover .sidebar-footer {
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
}

.footer-icons { display: flex; gap: 8px; }

.footer-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 16px;
}

.footer-icon:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.avatar-red {
    width: 28px;
    height: 28px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 11px;
    flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 1366px) {
    .sidebar { padding: 16px 8px 12px; }
    .sidebar:hover { padding: 16px 12px 12px; }
    .logo-area { margin-bottom: 24px; }
    .sidebar:hover .nav-item { height: 36px; font-size: 13px; padding: 0 10px; gap: 10px; }
    .nav-item { height: 36px; font-size: 13px; }
    .nav-item i { font-size: 14px; }
    .sidebar:hover .nav-item i { width: 18px; }
    .sidebar:hover .nav-section-title { font-size: 10px; padding: 6px 10px 3px; }
    .nav-section { margin-bottom: 12px; }
    .sidebar:hover .sidebar-footer { padding: 10px; }
    .footer-icon { width: 28px; height: 28px; }
    .fpt-logo-box { width: 30px; height: 30px; }
    .logo-text { font-size: 12px; }
}

@media (max-width: 1280px) {
    .sidebar { padding: 14px 6px 10px; }
    .sidebar:hover { padding: 14px 10px 10px; }
    .logo-area { margin-bottom: 20px; }
    .sidebar:hover .logo-area { gap: 8px; }
    .nav-item { height: 34px; font-size: 12px; }
    .sidebar:hover .nav-item { height: 34px; font-size: 12px; padding: 0 8px; gap: 8px; }
    .nav-item i { font-size: 13px; }
    .sidebar:hover .nav-item i { width: 18px; }
    .sidebar:hover .nav-section-title { font-size: 10px; padding: 5px 8px 2px; }
    .nav-section { margin-bottom: 10px; }
    .sidebar:hover .sidebar-footer { padding: 8px; gap: 8px; }
    .footer-icon { width: 26px; height: 26px; }
    .fpt-logo-box { width: 28px; height: 28px; }
    .logo-text { font-size: 11px; }
    .beta-badge { font-size: 10px; padding: 1px 5px; }
    .avatar-red { width: 28px; height: 28px; }
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    flex: 1;
    margin-left: 64px;
    margin-top: 12px;
    border-radius: 40px 0 0 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-color);
    min-height: calc(100vh - 12px);
    overflow: clip;
}

.top-header {
    height: var(--header-height);
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 13px;
    gap: 0;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: #bbb;
}

.breadcrumb-item.active {
    color: var(--text-color);
    font-weight: 500;
}

.breadcrumb-item.clickable {
    cursor: pointer;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.breadcrumb-item.clickable:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Content Body */
.content-body {
    padding: 0;
    flex: 1;
    overflow-y: auto;
}

/* ============================================
   Page Container
   ============================================ */
.page-container {
    max-width: 100%;
    padding: 0;
}