* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

:root {
    --primary: #ff9800;
    --secondary: #fff;
    --text: #495057;
    --dark-blue: #042954;
    --light-bg: #f8fafc;
    --border: #e2e8f0;
    --sidebar-width: 220px;
    --header-height: 65px;
}

.dashboard {
    display: flex;
    min-height: 100vh;
    background: #f5f7fbb5;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark-blue);
    border: none;
    height: 100vh;
    position: fixed;
    overflow-y: auto;
}

.brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    background: transparent;
    border: none;
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
}

.nav-section {
    padding: 0.5rem 0;
    border: none;
}

.nav-header {
    padding: 0 1.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    margin: 1rem 0 0.5rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1.5rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 400;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-link i {
    width: 1.25rem;
    font-size: 1rem;
    margin-right: 0.75rem;
    font-weight: 300;
}

.nav-link .arrow {
    margin-left: auto;
    font-size: 0.75rem;
    opacity: 0.5;
}

.sub-nav {
    background: #051F3E;
    display: none;
}

.sub-nav.active {
    display: block;
    padding: 10px 0px;
}


.nav-item.active>.nav-link {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active>.nav-link .arrow {
    transform: rotate(90deg);
    opacity: 1;
    color: var(--primary);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
}

/* Header */
.header {
    height: var(--header-height);
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-wrapper {
    width: 300px;
}

.search-bar {
    background: var(--light-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
}

.search-bar input {
    border: none;
    background: none;
    outline: none;
    font-size: 0.875rem;
    width: 100%;
    color: var(--text);
}

.search-shortcuts {
    display: flex;
    gap: 4px;
    margin-left: auto;
    padding-left: 12px;
    border-left: 1px solid var(--border);
}

.search-shortcuts span {
    background: #e9ecef;
    color: #6c757d;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.notification {
    position: relative;
    cursor: pointer;
}

.notification-badge {
    position: absolute;
    top: -16px;
    right: -16px;
    background: #ff4757;
    color: white;
    border-radius: 30px;
    padding: 2px 7px;
    font-size: 0.75rem;
    font-weight: 500;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: -10px;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.notification.active .notification-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-header {
    padding: 10px 1.5rem;
    background: #ff4757;
    color: white;
    border-radius: 12px 12px 0 0;
    font-weight: 500;
    font-size: 0.95rem;
}

.notification-body {
    max-height: 360px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

/* Utility */
.hidden {
    display: none !important;
}

.text-muted {
    color: #94a3b8;
}

.text-right {
    text-align: right;
}

/* Page header */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.page-title {
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--dark-blue);
}

.page-subtitle {
    color: var(--text);
    margin-top: 0.25rem;
    font-size: 0.95rem;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-select {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    color: var(--text);
    background: #fff;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 5px 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    background: var(--light-bg);
    color: var(--dark-blue);
}

.btn i {
    font-size: 1.05rem;
}

.btn-primary {
    background: var(--dark-blue);
    color: #fff;
}

.btn-primary:hover {
    background: #031d3d;
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--dark-blue);
}

.btn-secondary:hover {
    background: #cbd5f5;
}

.btn-success {
    background: #22c55e;
    color: #fff;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-danger {
    background: #f97316;
    color: #fff;
}

.btn-danger:hover {
    background: #ea580c;
}

.btn-ghost {
    background: transparent;
    color: var(--dark-blue);
}

.btn-ghost:hover {
    background: rgba(4, 41, 84, 0.08);
}

.btn.loading {
    opacity: 0.65;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Cards */
.card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.card + .card {
    margin-top: 2rem;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-blue);
}

.card-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin-top: 0.3rem;
}

.card-body {
    padding: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

/* Table */
.table-responsive {
    overflow-x: auto;
    max-width: 100%;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.table thead {
    background: #f8fafc;
}

.table th,
.table td {
    padding: 10px 15px;
    text-align: left;
    font-size: 13px;
    color: var(--text);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.table th {
    font-weight: 600;
    color: var(--dark-blue);
}

.action-buttons {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.action-buttons .btn {
    margin-left: 0;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: #fff;
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    position: relative;
    overflow: hidden;
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.35rem;
}

.stat-icon.total {
    background: linear-gradient(135deg, #2563eb, #60a5fa);
}

.stat-icon.pending {
    background: linear-gradient(135deg, #facc15, #f97316);
}

.stat-icon.approved {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.stat-icon.rejected {
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.stat-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark-blue);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-blue);
}

.stat-footer {
    font-size: 0.9rem;
    color: #64748b;
}

/* Status & badges */
.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 98px;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
    color: #fff;
}

.status-approved {
    background: #22c55e;
}

.status-succeeded {
    background: #22c55e;
}

.status-pending {
    background: #f59e0b;
}

.status-cancelled {
    background: #ef4444;
}

.status-expired {
    background: #94a3b8;
}

.status-rejected {
    background: #ef4444;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}

.badge-warning {
    background: rgba(234, 179, 8, 0.2);
    color: #b45309;
}

.legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #64748b;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-item .status {
    width: 12px;
    height: 12px;
    padding: 0;
    border-radius: 999px;
    min-width: 12px;
}

/* Toast */
.toast {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    background: rgba(34, 197, 94, 0.12);
    color: #166534;
}

.toast.error {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
}

/* Empty state */
.empty-state {
    padding: 3rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #94a3b8;
}

.empty-state i {
    font-size: 2.5rem;
}

.link-muted {
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
}

.link-muted:hover {
    color: var(--dark-blue);
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.package-card {
    background: #fff;
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.18);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.package-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.package-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-blue);
}

.package-description {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.5;
    min-height: 66px;
}

.package-badge {
    margin-bottom: 0.75rem;
}

.package-remaining {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #0f172a;
}

.package-remaining i {
    color: #f59e0b;
}

.package-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.meta-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    flex: 1 1 120px;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.meta-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.05em;
}

.meta-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-blue);
}

.package-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
}

.package-price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-blue);
}





.modal {
    /* position: fixed; */
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    /* align-items: center; */
    /* justify-content: center; */
    z-index: 999;
    /* margin: 0; */
    margin-left: 100px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.modal-dialog {
    position: relative;
    width: min(520px, 92vw);
    background: #fff;
    border-radius: 18px;
    height: 99vh;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    /* overflow: hidden; */
    z-index: 1;
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
}

.modal-header,
.modal-footer {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.modal-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    border-bottom: none;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-blue);
}

.modal-close {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 1.2rem;
    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    overflow: auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.form-group input,
.form-group textarea,
.form-group select {
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    font-size: 0.95rem;
    color: var(--dark-blue);
    background: #fff;
}

.form-group textarea {
    resize: vertical;
    min-height: 90px;
}

.form-group.inline {
    display: flex;
    gap: 1rem;
}

.form-group.inline > div {
    flex: 1;
}

.modal-open {
    overflow: hidden;
}

.modal.hidden {
    display: none;
}

.company-info dl {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 0;
}

.company-info .info-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.company-info dt {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.05em;
}

.company-info dd {
    margin: 0;
    font-size: 0.95rem;
    color: var(--dark-blue);
    word-break: break-word;
}

@media (max-width: 768px) {
    .companies-table .actions {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .companies-table .actions .btn {
        width: 100%;
        justify-content: center;
    }
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.notification-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.notification-icon.info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.notification-time {
    font-size: 0.75rem;
    color: #64748b;
}

/* Content Area */
.content {
    padding: 2rem;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.bg-primary {
    background: var(--primary);
}

.bg-success {
    background: #10b981;
}

.bg-warning {
    background: #f59e0b;
}

.bg-info {
    background: #3b82f6;
}

.stat-info h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.stat-info p {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0;
}

.stat-icon i {
    font-size: 1.5rem;
    font-weight: 300;
}

.table-section {
    background: var(--secondary);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-top: 2rem;
}

.table-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.table-header h2 {
    font-size: 1.2rem;
    color: var(--text);
    font-weight: 600;
}

.table-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.table-filter select {
    padding: 0.5rem 2rem 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--light-bg);
    cursor: pointer;
    outline: none;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.export-btn:hover {
    opacity: 0.9;
}

.table-container {
    overflow-x: auto;
    padding: 20px;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.data-table th {
    background: transparent;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
}

.data-table td {
    background: white;
    padding: 1rem;
    font-size: 0.875rem;
    color: var(--text);
}

.employee-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.employee-info img {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
}

.employee-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.employee-info span {
    font-size: 0.8rem;
    color: #6c757d;
}

.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.paid {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-badge.due {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.activity-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.performance-bar {
    background: #f1f3f5;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    width: 120px;
}

.performance-bar .progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #4895ef);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-btn {
    position: relative;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    background: transparent;
}

.btn-content {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
}

.btn-content i {
    position: absolute;
    left: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-text {
    position: absolute;
    left: 32px;
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    opacity: 0;
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* Edit Button */
.action-btn.edit {
    background: rgba(25, 118, 210, 0.05);
    color: #1976d2;
    border: 1px solid rgba(25, 118, 210, 0.1);
}

.action-btn.edit:hover {
    background: #1976d2;
    width: 73px;
}

/* View Button */
.action-btn.view {
    background: rgba(76, 175, 80, 0.05);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.1);
}

.action-btn.view:hover {
    background: #4CAF50;
    width: 73px;
}

/* Delete Button */
.action-btn.delete {
    background: rgba(244, 67, 54, 0.05);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.1);
}

.action-btn.delete:hover {
    background: #f44336;
    width: 80px;
}

/* Common Hover Effects */
.action-btn:hover {
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.action-btn:hover .btn-text {
    opacity: 1;
}

/* Active State */
.action-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Tooltip */
.action-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: white;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 1000;
}

.action-btn::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.action-btn:hover::before,
.action-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Animation for new items */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.action-buttons {
    animation: slideIn 0.3s ease;
}

/* Updated Table Styles */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.data-table th {
    background: transparent;
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: #6c757d;
    border-bottom: 2px solid #e9ecef;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f3f5;
    vertical-align: middle;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* Custom Dropdown */
.custom-dropdown {
    position: relative;
    min-width: 160px;
}

.dropdown-trigger {
    width: 100%;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text);
    transition: all 0.2s;
}

.dropdown-trigger:hover {
    border-color: var(--primary);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 100;
}

.custom-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: black;
}

.dropdown-item.active {
    background: #e9ecef;
    color: black;
}

/* Modern Button Design */
.action-button {
    position: relative;
    padding: 0.75rem 1.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    background: #3b82f6;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.action-button i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

/* Primary Button */
.action-button.primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* Hover Effects */
.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.2);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.action-button:hover i {
    transform: translateX(3px);
}

/* Active State */
.action-button:active {
    transform: translateY(1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.15);
}

/* Secondary Button */
.action-button.secondary {
    background: white;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.action-button.secondary:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #2563eb;
    color: #2563eb;
}

/* Loading State */
.action-button.loading {
    pointer-events: none;
    opacity: 0.8;
}

.action-button.loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    top: 50%;
    left: 50%;
    margin-left: -0.5rem;
    margin-top: -0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Sidebar Dropdown Enhancement */
.nav-link .arrow {
    font-size: 14px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.nav-item.active>.nav-link .arrow {
    transform: rotate(90deg);
    opacity: 1;
    color: var(--primary);
}

.sub-nav .nav-link {
    padding-left: 3rem;
    font-size: 0.75rem;
    opacity: 0.8;
}

.sub-nav .nav-link:hover {
    opacity: 1;
    background: rgba(59, 125, 221, 0.05);
    color: white;
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f8f9fa;
    margin: 4px 0;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #e0e4e8;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #cbd2d9;
}

/* Hide scrollbar when not hovering (optional) */
.sidebar:not(:hover)::-webkit-scrollbar-thumb {
    opacity: 0;
}

/* Ensure smooth scrolling */
.sidebar {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Add padding to prevent content overlap with scrollbar */
.nav-section:last-child {
    margin-bottom: 1rem;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    max-height: 85vh;
    overflow-y: auto;
    background: linear-gradient(to bottom, #ffffff 0%, #fafbfc 100%);
    border-radius: 16px;
    width: 85%;
    max-width: 550px;
}

.modal-overlay.active {
    display: flex;
}

.modal-overlay.active .modal {
    transform: translateY(0);
    opacity: 1;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.close-modal {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6c757d;
}

.close-modal i {
    font-size: 18px;
}

.close-modal:hover {
    background: #f1f3f5;
    color: #dc3545;
}

.modal-body {
    padding: 1.5rem 1.5rem 1.5rem 1.75rem;
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.2s;
    background: #f8f9fa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 125, 221, 0.1);
}

.form-group textarea {
    height: 300px;
    resize: vertical;
}

.form-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-submit,
.btn-cancel {
    position: relative;
    padding: 0.75rem 1.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    transition: all 0.3s ease;
}

.btn-submit {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.2);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.btn-cancel {
    background: #f1f5f9;
    color: #64748b;
}

.btn-cancel:hover {
    background: #fee2e2;
    color: #ef4444;
    transform: translateY(-2px);
}

.btn-submit:active,
.btn-cancel:active {
    transform: translateY(0);
}

/* Add New Button Style */
.action-button.add-new {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    margin-left: 1rem;
}

.action-button.add-new:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Enhanced Modal Styles */
.modal {
    max-height: 85vh;
    overflow-y: auto;
    background: linear-gradient(to bottom, #ffffff 0%, #fafbfc 100%);
    border-radius: 16px;
    width: 85%;
    max-width: 550px;
}

.modal-header {
    background: white;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h3 {
    font-size: 1.15rem;
    color: var(--text);
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

/* Custom Form Select */
.custom-select {
    position: relative;
}

.select-trigger {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text);
    transition: all 0.2s;
}

.select-trigger i {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.select-trigger.active i {
    transform: rotate(180deg);
}

.select-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 100;
    border: 1px solid var(--border);
}

.select-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.select-option {
    padding: 0.625rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.select-option:hover {
    background: #f8f9fa;
    color: var(--primary);
}

.select-option.selected {
    background: rgba(59, 125, 221, 0.1);
    color: var(--primary);
}

/* Enhanced Form Styles */
.form-group label {
    font-size: 0.880rem;
    margin-bottom: 0.375rem;
    color: #6c757d;
}

.form-group input,
.form-group textarea {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 0.625rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.select-trigger:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 125, 221, 0.1);
}

/* Modal Scrollbar Styles */
.modal::-webkit-scrollbar {
    width: 6px;
}

.modal::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 8px;
}

.modal::-webkit-scrollbar-thumb {
    background: #e0e4e8;
    border-radius: 8px;
    border: 2px solid #f8f9fa;
}

.modal::-webkit-scrollbar-thumb:hover {
    background: #cbd2d9;
}

/* Ensure modal content doesn't touch scrollbar */
.modal {
    padding-right: 4px;
}

.modal-body {
    padding: 1.5rem 1.5rem 1.5rem 1.75rem;
}

/* Enhance Select Menu Scrollbar when content is too long */
.select-menu {
    max-height: 200px;
    overflow-y: auto;
}

.select-menu::-webkit-scrollbar {
    width: 4px;
}

.select-menu::-webkit-scrollbar-track {
    background: transparent;
}

.select-menu::-webkit-scrollbar-thumb {
    background: #e0e4e8;
    border-radius: 4px;
}

.select-menu::-webkit-scrollbar-thumb:hover {
    background: #cbd2d9;
}

.user-profile {
    position: relative;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.profile-trigger img {
    border-radius: 50%;
}

.profile-trigger i {
    font-size: 12px;
    color: #6c757d;
    transition: transform 0.2s;
}

.user-profile.active .profile-trigger i {
    transform: rotate(180deg);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
}

.user-profile.active .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 1rem;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
}

.dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

.dropdown-item i {
   transition: all 0.35s linear;
    font-size: 1rem;
    opacity: 0.7;
}

.dropdown-item:hover {
    background: var(--light-bg);
    color: black;
}

.dropdown-item:hover i {
    opacity: 1;
}

#toaster-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    padding: 12px 24px;
    margin-bottom: 10px;
    border-radius: 4px;
    color: white;
    min-width: 250px;
    animation: toast-slide-in 0.3s ease-in;
}

.toast-success {
    background-color: #4caf50;
}

.toast-error {
    background-color: #f44336;
}

.toast-info {
    background-color: #2196f3;
}

.toast-fade-out {
    animation: toast-fade-out 0.3s ease-out forwards;
}

@keyframes toast-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-fade-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}
