/* ==========================================================================
   FinGreen - Main Stylesheet
   ========================================================================== */

:root {
    /* Color Palette - Premium Green Theme */
    --primary: #198754;        /* Bootstrap Success Green */
    --primary-light: #20c997;  /* Teal green */
    --primary-dark: #0f5132;   /* Dark green */
    --secondary: #d1e7dd;      /* Very light green background */
    --accent: #ffc107;         /* Warning/Accent yellow */
    
    /* Functional Colors */
    --success: #198754;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #0dcaf0;
    
    /* Neutral Colors / Text */
    --text-main: #212529;
    --text-muted: #6c757d;
    --bg-main: #f8f9fa;
    --bg-card: #ffffff;
    --border-color: #e9ecef;
    
    /* Layout & Shadow */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 78px;
    --header-height: 70px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --box-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-sm: 8px;
    --border-radius: 12px;
    --border-radius-lg: 16px;
}

/* Daily Task Action List Styles */
.task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #f1f3f5;
    transition: all 0.3s ease;
    cursor: pointer;
}

.task-item:hover {
    transform: translateX(5px);
    border-color: var(--primary-light);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.task-item.done {
    opacity: 0.6;
    background: #f8f9fa;
}

.task-item.done .task-title {
    text-decoration: line-through;
    color: #adb5bd;
}

.task-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-right: 12px;
    flex-shrink: 0;
}

.task-item.done .task-checkbox {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.priority-badge {
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-high { background: rgba(220,53,69,0.1); color: #dc3545; }
.priority-medium { background: rgba(255,193,7,0.1); color: #f59e0b; }
.priority-low { background: rgba(13,110,253,0.1); color: #0d6efd; }

.task-type-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 16px;
}


/* Chat Window Styles */
.chat-window {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    opacity: 0;
    pointer-events: none;
}

.chat-window.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0) scale(1);
    display: flex !important;
}

#chat-messages::-webkit-scrollbar {
    width: 5px;
}
#chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}
#chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.4;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.msg.sent {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.msg.received {
    align-self: flex-start;
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
}

.msg .meta {
    font-size: 10px;
    margin-top: 4px;
    opacity: 0.7;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.chat-toggle-btn:hover {
    transform: scale(1.1) rotate(5deg);
}

.chat-toggle-btn i {
    transition: 0.3s;
}

.chat-toggle-btn.active i {
    transform: rotate(90deg);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.5;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; outline: none; }

/* Utilities */
.primary-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
    color: white !important;
}

.primary-gradient p, .primary-gradient h3, .primary-gradient i {
    color: white !important;
}

.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1.5rem; }
.w-auto { width: auto !important; }

/* ==========================================================================
   Sidebar Navigation
   ========================================================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--sidebar-width);
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    z-index: 9999 !important;
    transition: var(--transition);
}

.sidebar.close {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    overflow: hidden;
    transition: var(--transition);
}

.sidebar.close .logo {
    opacity: 0;
    pointer-events: none;
}

.sidebar-header .logo i {
    font-size: 28px;
    color: var(--primary);
}

.sidebar-header .logo span {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
}

.sidebar-header #btn {
    font-size: 24px;
    cursor: pointer;
    color: var(--text-main);
}

.sidebar .nav-list {
    height: calc(100% - var(--header-height));
    padding-top: 20px;
    overflow: auto;
    overflow-x: hidden;
    /* Hide scrollbar */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.sidebar .nav-list:-webkit-scrollbar { display: none; }

.sidebar .nav-list li {
    position: relative;
    list-style: none;
    transition: var(--transition);
    padding: 2px 12px;
}

.sidebar .nav-list li .iocn-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar.close .nav-list li .iocn-link {
    display: block;
}

.sidebar .nav-list li i {
    height: 50px;
    min-width: 50px;
    text-align: center;
    line-height: 50px;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.sidebar .nav-list li.showMenu i.arrow {
    transform: rotate(-180deg);
}

.sidebar.close .nav-list i.arrow {
    display: none;
}

.sidebar .nav-list li a {
    display: flex;
    align-items: center;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.sidebar .nav-list li a:hover,
.sidebar .nav-list li.active > a,
.sidebar .nav-list li a.active {
    background: var(--secondary);
}

.sidebar .nav-list li a:hover i,
.sidebar .nav-list li a:hover .links_name,
.sidebar .nav-list li.active > a i,
.sidebar .nav-list li.active > a .links_name {
    color: var(--primary-dark);
    font-weight: 500;
}

.sidebar .nav-list li .links_name {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 400;
    white-space: nowrap;
    transition: var(--transition);
    pointer-events: none;
}

.sidebar.close .nav-list li .links_name {
    opacity: 0;
    pointer-events: none;
}

/* Sub Menu */
.sidebar .nav-list li .sub-menu {
    padding: 6px 6px 14px 50px;
    margin-top: -10px;
    background: transparent;
    display: none;
}

.sidebar .nav-list li.showMenu .sub-menu {
    display: block;
}

.sidebar .nav-list li .sub-menu a {
    color: var(--text-muted);
    font-size: 14px;
    padding: 8px 12px;
    white-space: nowrap;
    opacity: 0.8;
}

.sidebar .nav-list li .sub-menu a:hover {
    opacity: 1;
    background: transparent;
    color: var(--primary);
}

.sidebar.close .nav-list li .sub-menu {
    position: absolute;
    left: 100%;
    top: -10px;
    margin-top: 0;
    padding: 10px 20px;
    border-radius: 0 6px 6px 0;
    opacity: 0;
    display: block;
    pointer-events: none;
    transition: 0s;
    background: var(--bg-card);
    box-shadow: var(--box-shadow);
}

.sidebar.close .nav-list li:hover .sub-menu {
    top: 0;
    opacity: 1;
    pointer-events: auto;
    transition: all 0.4s ease;
}

.sidebar .nav-list li .sub-menu .link_name {
    display: none;
}

.sidebar.close .nav-list li .sub-menu .link_name {
    font-size: 16px;
    opacity: 1;
    display: block;
    font-weight: 600;
    color: var(--primary-dark);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 5px;
    padding-bottom: 5px;
}

/* Tooltip for collapsed sidebar */
.sidebar .nav-list li .tooltip {
    position: absolute;
    top: -20px;
    left: calc(100% + 15px);
    z-index: 3;
    background: var(--bg-card);
    box-shadow: var(--box-shadow);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
    opacity: 0;
    white-space: nowrap;
    pointer-events: none;
    transition: 0s;
}

.sidebar.close .nav-list li:hover .tooltip {
    opacity: 1;
    pointer-events: auto;
    transition: all 0.4s ease;
    top: 50%;
    transform: translateY(-50%);
}

.sidebar.close .nav-list li.showMenu:hover .tooltip {
    display: none;
}

/* Profile Area */
.sidebar .profile {
    position: fixed;
    bottom: 0;
    width: var(--sidebar-width);
    padding: 10px 14px;
    background: var(--secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar.close .profile {
    background: none;
    width: var(--sidebar-collapsed-width);
}

.profile-details {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.profile-details img {
    height: 45px;
    width: 45px;
    object-fit: cover;
    border-radius: 50%;
}

.profile-details .name_job {
    margin-left: 10px;
}

.profile-details .name {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark);
    white-space: nowrap;
}

.profile-details .job {
    font-size: 12px;
    color: var(--text-muted);
}

.sidebar.close .profile .name_job {
    display: none;
}

.sidebar.close .profile #log_out {
    display: none;
}

.sidebar .profile #log_out {
    color: var(--danger);
    font-size: 22px;
    cursor: pointer;
    min-width: 30px;
    text-align: center;
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */
.home-section {
    position: relative;
    background: var(--bg-main);
    min-height: 100vh;
    left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    transition: var(--transition);
}

.sidebar.close ~ .home-section {
    left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

/* Top Navbar */
.top-navbar {
    height: var(--header-height);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: var(--box-shadow);
}

.search-box {
    position: relative;
    height: 40px;
    max-width: 400px;
    width: 100%;
}

.search-box input {
    height: 100%;
    width: 100%;
    outline: none;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 0 15px 0 45px;
    font-size: 14px;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.1);
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 20px;
}

.top-nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-bell {
    position: relative;
    cursor: pointer;
    font-size: 24px;
    color: var(--text-muted);
}

.notification-bell .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: bold;
    height: 16px;
    width: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.date-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(25, 135, 84, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--bg-main);
    border-color: var(--text-muted);
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    transition: var(--transition);
}

.btn-icon:hover:not(:disabled) {
    background: var(--secondary);
    color: var(--primary);
    border-color: var(--primary-light);
}

.btn-icon.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-icon:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* View Sections */
.main-content {
    padding: 30px;
}

.view-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.view-section.active {
    display: block;
}

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

.page-header {
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

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

/* ==========================================================================
   Dashboard Components
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
    border-color: var(--primary-light);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary);
    background: var(--secondary);
}

.stat-icon.b-blue { color: #0d6efd; background: #cfe2ff; }
.stat-icon.b-purple { color: #6f42c1; background: #e0cffc; }
.stat-icon.b-orange { color: #fd7e14; background: #ffe5d0; }
.stat-icon.b-red { color: var(--danger); background: #f8d7da; }

.stat-info p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 500;
}

.stat-info h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

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

.action-btn {
    cursor: pointer;
    color: var(--text-muted);
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: var(--bg-card);
    padding: 16px 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
}

.search-filter {
    position: relative;
    width: 300px;
}

.search-filter input {
    width: 100%;
    padding: 8px 16px 8px 40px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    font-size: 14px;
    transition: var(--transition);
}

.search-filter input:focus {
    border-color: var(--primary);
}

.search-filter i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-main);
}

.data-table td {
    font-size: 14px;
    color: var(--text-main);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background-color: var(--secondary);
}

.badge-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.status-lunas { background: #d1e7dd; color: #0f5132; }
.status-sebagian { background: #fff3cd; color: #856404; }
.status-belum { background: #f8d7da; color: #842029; }

/* WhatsApp Buttons */
.wa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #25D366;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    text-decoration: none;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.2);
}

.wa-btn:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    background: #20BA56;
}

.wa-btn.disabled {
    background: #adb5bd !important;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.wa-btn.wa-partial {
    background: #FFC107;
    box-shadow: 0 4px 10px rgba(255, 193, 7, 0.2);
}

.wa-btn.wa-partial:hover {
    background: #eab000;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.last-contacted {
    display: block;
    font-size: 10px;
    color: #6c757d;
    margin-top: 4px;
    font-weight: 500;
}

/* WA Log Status Colors */
.wa-log-success { color: #25D366; font-weight: 600; }
.wa-log-failed { color: #dc3545; font-weight: 600; }

.wa-badge-pill {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.wa-badge-success { background: rgba(37, 211, 102, 0.1); color: #25D366; }
.wa-badge-failed { background: rgba(220, 53, 69, 0.1); color: #dc3545; }

/* Grid Utilities */
.mt-4 { margin-top: 1.5rem !important; }


/* Quick Actions on Hover Logic */
.data-table tbody tr {
    transition: all 0.2s ease;
}

.data-table tbody tr .quick-actions {
    opacity: 0.1;
    transition: opacity 0.2s ease;
}

.data-table tbody tr:hover .quick-actions {
    opacity: 1;
}


.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.page-controls {
    display: flex;
    gap: 4px;
}

/* ==========================================================================
   Modals & Forms
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-card);
    width: 100%;
    max-width: 600px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.95) translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-close {
    font-size: 24px;
    color: var(--text-muted);
}

.btn-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group.row {
    display: flex;
    gap: 16px;
}

.form-group.row .col {
    flex: 1;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-control, .form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    transition: var(--transition);
    background: var(--bg-card);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.1);
}

.text-lg {
    font-size: 24px !important;
    font-weight: 700;
}

.radio-group {
    display: flex;
    gap: 12px;
}

.radio-card {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 600;
}

.radio-card:hover {
    background: var(--bg-main);
}

.radio-card.active {
    border-color: var(--primary);
    background: var(--secondary);
}

.radio-card input {
    display: none;
}

.radio-card i {
    font-size: 20px;
}

/* ==========================================================================
   Responsive Queries
   ========================================================================== */
@media screen and (max-width: 992px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }
    
    .sidebar .logo span,
    .sidebar .nav-list li .links_name,
    .sidebar .profile .name_job,
    .sidebar .profile #log_out,
    .sidebar .nav-list li i.arrow {
        display: none;
    }
    
    .home-section {
        left: var(--sidebar-collapsed-width);
        width: calc(100% - var(--sidebar-collapsed-width));
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .search-box {
        display: none; /* Hide search on mobile, maybe add a bell icon only */
    }
}

@media screen and (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group.row {
        flex-direction: column;
    }
}

/* Invoice View Sub-Tabs */
.custom-tabs {
    display: flex;
    gap: 15px;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
}
.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}
.tab-btn:hover {
    color: var(--primary);
}
.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.invoice-tab-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}
.invoice-tab-content.active {
    display: block;
}
.invoice-status-card {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 15px;
    border-left: 4px solid var(--primary);
    cursor: pointer;
    transition: transform 0.2s;
}
.invoice-status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}
.status-lunas-border { border-left-color: var(--success); }
.status-belum-border { border-left-color: var(--danger); }

/* ==========================================================================
   Pengaturan Pages - Role & Category Badges
   ========================================================================== */

/* Role Badges */
.role-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    letter-spacing: 0.3px;
}
.role-owner { background: linear-gradient(135deg, #198754, #20c997); color: white; }
.role-admin { background: linear-gradient(135deg, #0d6efd, #6ea8fe); color: white; }
.role-finance { background: linear-gradient(135deg, #6f42c1, #a98eda); color: white; }
.role-viewer { background: #e9ecef; color: #495057; }

/* Status Active/Inactive */
.status-aktif { background: #d1e7dd; color: #0f5132; }
.status-nonaktif { background: #f8d7da; color: #842029; }

/* Category Color Dot */
.color-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid rgba(0,0,0,0.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Category Badge with Color */
.category-badge {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(0,0,0,0.08);
}

.category-badge .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

/* Tipe Badge */
.tipe-badge {
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tipe-bank { background: #cfe2ff; color: #084298; }
.tipe-cash { background: #d1e7dd; color: #0f5132; }
.tipe-nisbah { background: #e0cffc; color: #432874; }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}
.empty-state img {
    margin-bottom: 20px;
    opacity: 0.8;
}
.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}
.empty-state p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-dark);
    color: white;
    padding: 14px 24px;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    animation: slideInToast 0.4s ease, fadeOutToast 0.4s ease 2.6s forwards;
    max-width: 400px;
}

.toast-notification.toast-success { background: var(--primary); }
.toast-notification.toast-danger { background: var(--danger); }
.toast-notification.toast-warning { background: #e67e22; }

.toast-notification i {
    font-size: 20px;
}

@keyframes slideInToast {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOutToast {
    from { opacity: 1; }
    to { opacity: 0; pointer-events: none; }
}

/* User Avatar in table */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

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

.user-info-cell .name {
    font-weight: 600;
    font-size: 14px;
}

/* Font utilities */
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }

/* Layout Helpers */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.col-md-6 {
    flex: 1;
    min-width: 280px;
}

.col-md-4 {
    flex: 0 0 calc(33.333% - 14px);
    min-width: 120px;
}

.justify-content-end { justify-content: flex-end; }
.d-block { display: block; }
.border-0 { border: none !important; }
.pb-0 { padding-bottom: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 2rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.pt-3 { padding-top: 1rem; }
.m-0 { margin: 0; }
.p-3 { padding: 1rem; }
.border-bottom { border-bottom: 1px solid var(--border-color); }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary) !important; }
.flex-column { flex-direction: column; }
.w-100 { width: 100%; }
.text-white { color: white !important; }
.border-success { border-color: var(--success) !important; }
.border-danger { border-color: var(--danger) !important; }
.d-inline-block { display: inline-block; }

/* ==========================================================================
   Redesign Additions (Dashboard SaaS V2)
   ========================================================================== */
.stat-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05) !important;
    border-color: var(--primary-light) !important;
}

.insight-item:hover {
    background: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transform: translateX(5px);
}

.fab-btn:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 12px 25px rgba(0,0,0,0.15) !important;
}

.audio-btn:hover #audio-menu {
    display: flex !important;
}

#audio-menu {
    z-index: 1000;
}

#audio-menu::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 15px;
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
}
