/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #FF6B35;
    --primary-dark: #E85A2A;
    --primary-light: #FF8C5A;
    --secondary: #F7931E;
    --accent: #FFA94D;
    --orange-50: #FFF4E6;
    --orange-100: #FFE4CC;
    --orange-200: #FFD0A8;
    --orange-300: #FFB373;
    --orange-400: #FF9447;
    --orange-500: #FF6B35;
    --orange-600: #E85A2A;
    --orange-700: #C04A22;
    --gradient-primary: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    --gradient-warm: linear-gradient(135deg, #FF8C42 0%, #FFB347 100%);
    --gradient-deep: linear-gradient(135deg, #E85D04 0%, #F48C06 100%);
    --bg-main: #FFF8F3;
    --bg-card: #FFFFFF;
    --bg-sidebar: #2D2620;
    --bg-sidebar-hover: #3D332C;
    --text-primary: #2D2620;
    --text-secondary: #6B5B4F;
    --text-light: #9B8B7F;
    --text-white: #FFFFFF;
    --border: #FFE4CC;
    --shadow-sm: 0 2px 4px rgba(255, 107, 53, 0.08);
    --shadow-md: 0 4px 12px rgba(255, 107, 53, 0.12);
    --shadow-lg: 0 8px 24px rgba(255, 107, 53, 0.15);
    --shadow-xl: 0 16px 40px rgba(255, 107, 53, 0.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #2D2620 0%, #3D332C 100%);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.sidebar.collapsed {
    transform: translateX(-280px);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    color: white;
    box-shadow: var(--shadow-md);
}

.logo-text h2 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    color: white;
}

.logo-text span {
    font-size: 11px;
    color: var(--accent);
    font-weight: 500;
}

.toggle-sidebar {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: none;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--orange-500);
    border-radius: 4px;
}

.nav-section {
    padding: 16px 12px 8px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--orange-300);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    position: relative;
}

.nav-item:hover {
    background: rgba(255, 107, 53, 0.15);
    color: white;
    transform: translateX(4px);
}

.nav-item.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
}

.nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 14px;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.user-role {
    font-size: 11px;
    color: var(--orange-300);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: 0;
}

/* ===== TOPBAR ===== */
.topbar {
    background: white;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    background: var(--orange-50);
    border: none;
    color: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
}

.menu-toggle:hover {
    background: var(--primary);
    color: white;
}

.breadcrumb {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--orange-50);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all 0.2s ease;
}

.search-box:focus-within {
    background: white;
    box-shadow: 0 0 0 2px var(--primary);
}

.search-box input {
    background: transparent;
    border: none;
    padding: 10px 16px;
    width: 240px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
}

.search-btn {
    background: transparent;
    border: none;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.topbar-btn {
    position: relative;
    background: var(--orange-50);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    color: var(--primary);
}

.topbar-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.topbar-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-avatar-small {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 12px;
}

/* ===== PAGE CONTAINER ===== */
.page-container {
    padding: 32px;
}

.page {
    display: none;
    animation: fadeIn 0.4s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== WELCOME BANNER ===== */
.welcome-banner {
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    padding: 40px;
    color: white;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.welcome-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: 20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.welcome-content {
    position: relative;
    z-index: 2;
    flex: 1;
}

.welcome-content h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.welcome-content p {
    font-size: 15px;
    opacity: 0.95;
    margin-bottom: 24px;
    max-width: 600px;
}

.welcome-stats {
    display: flex;
    gap: 32px;
}

.welcome-stat {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.stat-lbl {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 4px;
}

.welcome-graphic {
    position: relative;
    z-index: 2;
}

.circle-graphic {
    width: 160px;
    height: 160px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.circle-graphic::before {
    content: '9D';
    font-size: 64px;
    font-weight: 800;
    background: linear-gradient(135deg, #FFFFFF 0%, #FFE4CC 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== SECTION TITLE ===== */
.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-left: 12px;
    border-left: 4px solid var(--primary);
}

/* ===== DEPARTMENT GRID ===== */
.dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.dept-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.dept-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.dept-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--orange-200);
}

.dept-card:hover::before {
    transform: scaleX(1);
}

.dept-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
}

.dept-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.dept-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    min-height: 40px;
}

.dept-stats {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.dept-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dept-stat strong {
    font-size: 16px;
    color: var(--primary);
    font-weight: 700;
}

.dept-stat span {
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.dept-action {
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    transition: gap 0.2s ease;
}

.dept-card:hover .dept-action {
    gap: 8px;
}

/* ===== DASHBOARD ROW ===== */
.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 32px;
}

.dashboard-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--orange-50);
}

.card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.card-link:hover {
    color: var(--primary-dark);
}

.card-search {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    font-family: inherit;
    font-size: 13px;
    background: var(--orange-50);
    width: 200px;
    transition: all 0.2s ease;
}

.card-search:focus {
    background: white;
    box-shadow: 0 0 0 2px var(--primary);
}

/* ===== ACTIVITY LIST ===== */
.activity-list {
    list-style: none;
}

.activity-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--orange-50);
    font-size: 13px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.activity-list li:last-child {
    border-bottom: none;
}

.activity-list strong {
    color: var(--primary);
    font-weight: 600;
    margin-right: 4px;
}

.activity-dot {
    width: 8px;
    height: 8px;
    background: var(--gradient-primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.activity-time {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-light);
    background: var(--orange-50);
    padding: 4px 10px;
    border-radius: 12px;
}

/* ===== AGENDA LIST ===== */
.agenda-list {
    list-style: none;
}

.agenda-list li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--orange-50);
}

.agenda-list li:last-child {
    border-bottom: none;
}

.agenda-date {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.agenda-date .day {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.agenda-date .month {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 2px;
}

.agenda-info {
    display: flex;
    flex-direction: column;
}

.agenda-info strong {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.agenda-info span {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header-content h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.page-header-content p {
    color: var(--text-secondary);
    font-size: 14px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-sm {
    background: var(--orange-50);
    color: var(--primary);
    border: 1px solid var(--orange-200);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-sm:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== STAT GRID ===== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--orange-100) 0%, transparent 70%);
    transform: translate(30%, -30%);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon-box {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
    z-index: 1;
}

.stat-content {
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 4px 0;
}

.stat-change {
    font-size: 11px;
    font-weight: 500;
}

.stat-change.positive {
    color: #4CAF50;
}

.stat-change.negative {
    color: #F44336;
}

.stat-change.neutral {
    color: var(--text-light);
}

/* ===== CONTENT GRID ===== */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.content-grid .content-card.large {
    grid-column: span 1;
}

.content-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.content-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--orange-50);
}

/* ===== BAR CHART ===== */
.chart-placeholder {
    height: 280px;
    display: flex;
    align-items: end;
    padding: 20px 0;
}

.bar-chart {
    display: flex;
    align-items: end;
    justify-content: space-around;
    gap: 16px;
    width: 100%;
    height: 240px;
    padding: 20px 8px 0;
}

.bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 100%;
    justify-content: end;
}

.bar {
    width: 100%;
    max-width: 50px;
    background: var(--gradient-primary);
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 -2px 8px rgba(255, 107, 53, 0.2);
    min-height: 30px;
    display: flex;
    align-items: start;
    justify-content: center;
}

.bar:hover {
    background: var(--gradient-deep);
    transform: scaleY(1.05);
    transform-origin: bottom;
}

.bar span {
    color: white;
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
}

.bar-item label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    text-align: center;
}

.chart-note {
    text-align: center;
    font-size: 11px;
    color: var(--text-light);
    margin-top: 12px;
    font-style: italic;
}

/* ===== RANKING LIST ===== */
.ranking-list {
    list-style: none;
}

.ranking-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--orange-50);
}

.ranking-list li:last-child {
    border-bottom: none;
}

.rank {
    width: 32px;
    height: 32px;
    background: var(--orange-50);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.ranking-list li:nth-child(1) .rank {
    background: var(--gradient-primary);
    color: white;
}

.ranking-list li:nth-child(2) .rank {
    background: linear-gradient(135deg, #F7931E, #FFA94D);
    color: white;
}

.ranking-list li:nth-child(3) .rank {
    background: linear-gradient(135deg, #FFA94D, #FFC987);
    color: white;
}

.rank-info {
    display: flex;
    flex-direction: column;
}

.rank-info strong {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
}

.rank-info span {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
}

/* ===== DATA TABLE ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.data-table thead {
    background: var(--orange-50);
}

.data-table th {
    text-align: left;
    padding: 14px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--orange-200);
}

.data-table td {
    padding: 14px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--orange-50);
}

.data-table tbody tr {
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: var(--orange-50);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== BADGE STATUS ===== */
.badge-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-status.hot {
    background: #FFE4CC;
    color: #E85A2A;
}

.badge-status.warm {
    background: #FFF4E6;
    color: #F7931E;
}

.badge-status.cold {
    background: #F0F0F0;
    color: #6B5B4F;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--orange-50);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}

.progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.4s ease;
    box-shadow: 0 0 8px rgba(255, 107, 53, 0.4);
}

/* ===== CHANNEL LIST ===== */
.channel-list,
.bank-list,
.cluster-list,
.project-list,
.budget-list {
    list-style: none;
}

.channel-list li,
.bank-list .bank-item,
.cluster-list li,
.project-list li,
.budget-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--orange-50);
}

.channel-list li:last-child,
.bank-list .bank-item:last-child,
.cluster-list li:last-child,
.project-list li:last-child,
.budget-list li:last-child {
    border-bottom: none;
}

.channel-info,
.bank-stats,
.cluster-stats,
.project-info,
.budget-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.channel-info strong,
.cluster-info strong,
.project-info strong,
.budget-info strong {
    color: var(--text-primary);
}

.bank-item {
    padding: 14px 0;
}

.bank-name {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 14px;
}

.bank-value {
    color: var(--primary);
    font-weight: 700;
}

.stat-occupied {
    color: #4CAF50;
    font-weight: 600;
    font-size: 12px;
}

.stat-empty {
    color: #F44336;
    font-weight: 600;
    font-size: 12px;
}

.cluster-info,
.project-info,
.budget-info {
    display: flex;
    flex-direction: column;
    align-items: start;
    margin-bottom: 8px;
}

.cluster-info span,
.project-info span,
.budget-info span {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
}

.project-list li,
.budget-list li {
    display: grid;
    grid-template-columns: 1fr 100px 50px;
    align-items: center;
    gap: 12px;
}

.project-percent,
.budget-percent {
    font-weight: 700;
    color: var(--primary);
    font-size: 14px;
    text-align: right;
}

/* ===== AGING LIST ===== */
.aging-list {
    list-style: none;
}

.aging-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    margin-bottom: 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    border-left: 4px solid;
    transition: all 0.2s ease;
}

.aging-item:hover {
    transform: translateX(4px);
}

.aging-item.green {
    background: #E8F5E9;
    border-color: #4CAF50;
    color: #2E7D32;
}

.aging-item.yellow {
    background: #FFF8E1;
    border-color: #FFC107;
    color: #F57C00;
}

.aging-item.orange {
    background: #FFF4E6;
    border-color: #FF9800;
    color: #E65100;
}

.aging-item.red {
    background: #FFEBEE;
    border-color: #F44336;
    color: #C62828;
}

.aging-item strong {
    font-weight: 700;
    font-size: 14px;
}

/* ===== CONTENT SCHEDULE, LICENSE, LAC, APPROVAL, MAINTENANCE, TICKET, ACCOUNT, TAX ===== */
.content-schedule,
.license-list,
.lac-list,
.approval-list,
.maintenance-list,
.ticket-list,
.account-list,
.tax-list {
    list-style: none;
}

.content-schedule li,
.license-list li,
.lac-list li,
.approval-list li,
.maintenance-list li,
.ticket-list li,
.account-list li,
.tax-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--orange-50);
    justify-content: space-between;
}

.content-schedule li:last-child,
.license-list li:last-child,
.lac-list li:last-child,
.approval-list li:last-child,
.maintenance-list li:last-child,
.ticket-list li:last-child,
.account-list li:last-child,
.tax-list li:last-child {
    border-bottom: none;
}

.schedule-date {
    background: var(--gradient-primary);
    color: white;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    text-align: center;
    min-width: 60px;
}

.schedule-info,
.license-info,
.lac-info,
.approval-info,
.maint-info,
.ticket-info,
.account-info,
.tax-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.schedule-info strong,
.license-name,
.lac-info strong,
.approval-info strong,
.maint-info strong,
.ticket-info strong,
.account-info strong,
.tax-info strong {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
}

.schedule-info span,
.lac-info span,
.approval-info span,
.maint-info span,
.ticket-info span,
.account-info span,
.tax-info span {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
}

.license-name {
    flex: 1;
}

.lac-list li {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.lac-info {
    margin-bottom: 4px;
}

.account-balance {
    color: var(--primary);
    font-weight: 700;
    font-size: 15px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .dashboard-row,
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-280px);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .toggle-sidebar {
        display: block;
    }

    .page-container {
        padding: 20px;
    }

    .welcome-banner {
        flex-direction: column;
        padding: 28px;
        text-align: center;
    }

    .welcome-content h1 {
        font-size: 24px;
    }

    .welcome-stats {
        justify-content: center;
        flex-wrap: wrap;
    }

    .welcome-graphic {
        margin-top: 24px;
    }

    .circle-graphic {
        width: 120px;
        height: 120px;
    }

    .circle-graphic::before {
        font-size: 48px;
    }

    .dept-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        padding: 12px 16px;
    }

    .search-box {
        display: none;
    }

    .data-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .welcome-content h1 {
        font-size: 20px;
    }

    .topbar-user span {
        display: none;
    }
}

/* ===== IMPORT DATA - BUTTONS & MODAL ===== */
.page-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-import {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-import:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.import-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(45, 38, 32, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 20px;
}

.import-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.import-modal {
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    transform: translateY(20px) scale(0.98);
    transition: transform 0.25s ease;
    overflow: hidden;
}

.import-modal-overlay.open .import-modal {
    transform: translateY(0) scale(1);
}

.import-modal-header {
    background: var(--gradient-primary);
    color: white;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.import-modal-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.import-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.import-modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg);
}

.import-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.import-modal-body::-webkit-scrollbar {
    width: 8px;
}

.import-modal-body::-webkit-scrollbar-thumb {
    background: var(--orange-300);
    border-radius: 4px;
}

.import-info-box {
    background: var(--orange-50);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.import-info-box strong {
    color: var(--primary);
}

.import-format {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 20px;
}

.import-format-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 12px;
}

.import-format-head h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-template {
    background: var(--gradient-warm);
    color: white;
    border: none;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn-template:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.import-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.col-chip {
    background: var(--orange-50);
    color: var(--text-primary);
    border: 1px solid var(--orange-200);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.col-chip em {
    color: var(--primary);
    font-style: normal;
    font-weight: 500;
    font-size: 11px;
}

.import-dropzone {
    border: 2.5px dashed var(--orange-300);
    border-radius: var(--radius-md);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    margin-bottom: 20px;
}

.import-dropzone:hover,
.import-dropzone.dragover {
    border-color: var(--primary);
    background: var(--orange-50);
    transform: translateY(-2px);
}

.dropzone-icon {
    font-size: 42px;
    display: block;
    margin-bottom: 10px;
}

.dropzone-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.dropzone-hint {
    font-size: 12px;
    color: var(--text-light);
}

.dropzone-file {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.import-preview {
    margin-top: 4px;
}

.preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 6px;
}

.preview-head strong {
    font-size: 14px;
    color: var(--text-primary);
}

.preview-head span {
    font-size: 12px;
    color: var(--text-light);
}

.preview-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
    font-size: 13px;
}

.preview-scroll {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.preview-table th {
    background: var(--orange-50);
    color: var(--text-primary);
    text-align: left;
    padding: 10px 12px;
    font-weight: 700;
    white-space: nowrap;
    border-bottom: 2px solid var(--orange-200);
}

.preview-table td {
    padding: 9px 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--orange-50);
    white-space: nowrap;
}

.preview-table tbody tr:last-child td {
    border-bottom: none;
}

.import-modal-footer {
    background: white;
    border-top: 1px solid var(--border);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.import-mode {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
}

.import-mode input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.btn-reset-data {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.btn-reset-data:hover {
    color: #F44336;
}

.footer-buttons {
    display: flex;
    gap: 10px;
}

.btn-cancel {
    background: var(--orange-50);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    background: var(--orange-100);
}

.btn-confirm {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
}

.btn-confirm:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* ===== IMPORTED ROW ANIMATION ===== */
.imported-row {
    animation: rowFadeIn 0.5s ease;
}

@keyframes rowFadeIn {
    from {
        background: var(--orange-100);
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        background: transparent;
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    color: var(--text-primary);
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    font-weight: 600;
    border-left: 4px solid var(--primary);
    min-width: 280px;
    max-width: 380px;
    opacity: 0;
    transform: translateX(120%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    border-left-color: #4CAF50;
}

.toast-error {
    border-left-color: #F44336;
}

.toast-warn {
    border-left-color: var(--secondary);
}

@media (max-width: 768px) {
    .import-modal {
        max-height: 94vh;
    }

    .import-modal-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .footer-buttons {
        justify-content: stretch;
    }

    .footer-buttons button {
        flex: 1;
    }

    .toast-container {
        top: auto;
        bottom: 16px;
        right: 16px;
        left: 16px;
    }

    .toast {
        min-width: 0;
        max-width: none;
    }
}

/* ===== DATABASE STATUS BADGE ===== */
.db-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: default;
    transition: all 0.2s ease;
}

.db-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.db-status.checking {
    background: #F0F0F0;
    color: var(--text-light);
}

.db-status.checking .dot {
    background: var(--text-light);
}

.db-status.online {
    background: #E8F5E9;
    color: #2E7D32;
}

.db-status.online .dot {
    background: #4CAF50;
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.6);
    animation: dbPulse 2s infinite;
}

.db-status.offline {
    background: var(--orange-50);
    color: var(--secondary);
}

.db-status.offline .dot {
    background: var(--secondary);
}

@keyframes dbPulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.6); }
    70% { box-shadow: 0 0 0 6px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

@media (max-width: 768px) {
    .db-status {
        padding: 6px 10px;
        font-size: 0;
        gap: 0;
    }
    .db-status .dot {
        width: 10px;
        height: 10px;
    }
}
