:root {
    --primary: #1B8A6B;
    --primary-hover: #157A5E;
    --primary-light: #E8F5F0;
    --primary-bg: #F0FAF6;
    --sidebar-width: 250px;
    --text-dark: #1A1D1F;
    --text-secondary: #6F767E;
    --bg-main: #F4F4F4;
    --card-border: #EFEFEF;
    --danger: #E53935;
    --warning: #FF9800;
    --success: #1B8A6B;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: #fff;
    border-right: 1px solid var(--card-border);
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed {
    margin-left: calc(-1 * var(--sidebar-width));
}

.sidebar-brand {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1rem;
}

.sidebar-brand .brand-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
}

.sidebar-nav {
    padding: 0.5rem 0.75rem;
}

.sidebar-heading {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 0.75rem 0.75rem 0.375rem;
    letter-spacing: 0.04em;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s;
    margin-bottom: 2px;
}

.sidebar-link:hover {
    color: var(--text-dark);
    background: var(--bg-main);
}

.sidebar-link.active {
    color: #fff;
    background: var(--primary);
}

.sidebar-link.active i {
    color: #fff;
}

.sidebar-link i {
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
}

/* Submenu */
.sidebar-submenu .sidebar-link {
    padding-left: 2.5rem;
    font-size: 0.8125rem;
}

/* Top Navbar */
.top-navbar {
    background: #fff;
    border-bottom: 1px solid var(--card-border);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-navbar .page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 0.8125rem;
}

.user-info {
    text-align: right;
    line-height: 1.2;
}

.user-info .user-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-dark);
}

.user-info .user-role {
    font-size: 0.6875rem;
    color: var(--text-secondary);
}

/* Main content */
#page-content {
    min-height: 100vh;
    overflow-x: hidden;
}

.main-content {
    padding: 1.5rem;
}

/* Stats Cards */
.stat-card {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.25rem;
}

.stat-card .stat-icon {
    color: var(--text-secondary);
    font-size: 1rem;
}

.stat-card .stat-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-left: 0.375rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0.25rem 0;
}

.stat-card .stat-change {
    font-size: 0.75rem;
    font-weight: 600;
}

.stat-card .stat-change.positive {
    color: var(--success);
}

.stat-card .stat-change.negative {
    color: var(--danger);
}

.stat-card .stat-period {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: 0.25rem;
}

/* Data Table */
.data-table-wrapper {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
}

.data-table-header {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.data-table-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.data-table-count strong {
    color: var(--text-dark);
}

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

.data-table thead th {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
    background: #FAFAFA;
    white-space: nowrap;
}

.data-table tbody td {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: var(--text-dark);
    border-bottom: 1px solid var(--card-border);
    vertical-align: middle;
}

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

.data-table tbody tr:hover {
    background: #FAFAFA;
}

/* User link */
.user-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.user-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Badges */
.badge-status {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-active {
    color: var(--success);
    background: var(--primary-light);
}

.badge-inactive {
    color: #6F767E;
    background: #F4F4F4;
}

.badge-verified {
    color: var(--success);
    background: var(--primary-light);
}

.badge-not-verified {
    color: #6F767E;
    background: #F4F4F4;
}

.badge-deleted {
    color: var(--danger);
    background: #FDEAEA;
}

.badge-pending {
    color: var(--warning);
    background: #FFF3E0;
}

/* Profile progress */
.profile-progress {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.profile-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.profile-dot.high {
    background: var(--success);
}

.profile-dot.medium {
    background: #FF9800;
}

.profile-dot.low {
    background: #BDBDBD;
}

.profile-percentage {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* Action buttons */
.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: var(--text-secondary);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.9375rem;
    padding: 0;
    text-decoration: none;
}

.action-btn:hover {
    background: var(--bg-main);
    color: var(--text-dark);
}

.action-btn.action-delete {
    color: var(--danger);
}

.action-btn.action-delete:hover {
    background: #FDEAEA;
}

/* Buttons */
.btn-primary-custom {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: background 0.15s;
    text-decoration: none;
}

.btn-primary-custom:hover {
    background: var(--primary-hover);
    color: #fff;
}

.btn-outline-custom {
    background: #fff;
    color: var(--text-dark);
    border: 1px solid #E0E0E0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.15s;
    text-decoration: none;
}

.btn-outline-custom:hover {
    border-color: #BDBDBD;
    background: #FAFAFA;
    color: var(--text-dark);
}

/* Pagination */
.pagination-custom .page-link {
    border: 1px solid #E0E0E0;
    color: var(--text-dark);
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    margin: 0 2px;
}

.pagination-custom .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pagination-custom .page-link:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* Forms */
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(27, 138, 107, 0.15);
}

/* Card styled for forms */
.form-card {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
        position: fixed;
        z-index: 1050;
    }

    .sidebar.show {
        margin-left: 0;
    }
}

/* Alert overrides */
.alert-success {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

/* Dropdown menu for user */
.dropdown-item:active {
    background: var(--primary);
}

/* Search input */
.search-input {
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    min-width: 220px;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(27, 138, 107, 0.15);
}

/* Filter panel */
.filter-panel {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.filter-panel .form-select, .filter-panel .form-control {
    font-size: 0.8125rem;
    border-radius: 8px;
}

/* Table footer */
.table-footer {
    padding: 0.75rem 1.25rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-align: center;
    border-top: 1px solid var(--card-border);
}
