
/* Import Inter font for a modern appearance */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

body {
    /* Use Inter as primary font */
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Lighten the overall page background for a fresher look */
    background: #F5F8FF;
    color: #0A4473;
    line-height: 1.6;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;Working...
    /* Light background to separate it from the content area */
    background: #FFFFFF;
    border-right: 1px solid #ECEFF5;
    overflow-y: auto;
    padding-top: 0;
    transition: width 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}
.sidebar .brand {
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 20px;
    font-size: 20px;
    font-weight: bold;
    color: #003A8C;
}
.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar ul li {
    position: relative;
}
.sidebar ul li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #0A4473;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
    border-left: 4px solid transparent;
}

/* Sub menu anchor styling */
.sidebar ul li ul li a {
    font-size: 14px;
    color: #586998;
    padding-left: 50px;
    border-left: 4px solid transparent;
}

/* Hover state for sub menu links */
.sidebar ul li ul li a:hover {
    background: #EEF5FF;
    color: #1A62B3;
}

/* Count badge on main menu showing number of subpages */
.sidebar ul li a .menu-count {
    margin-left: auto;
    font-size: 12px;
    background: #EFF4FA;
    color: #0A4473;
    padding: 2px 6px;
    border-radius: 10px;
}
/* Hover state for main menu links */
.sidebar ul li a:hover {
    background: #E5EDF7;
    color: #1A62B3;
}

/* Active state for main menu links */
.sidebar ul li.active > a {
    background: #D7E4F6;
    color: #1A62B3;
    font-weight: 600;
    border-left-color: #1A62B3;
}
.sidebar ul li a i {
    margin-right: 10px;
    color: inherit;
}
.sidebar ul li ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
}
.sidebar ul li.active ul {
    height: auto;
}
.sidebar .badge {
    background: #E74C3C;
    color: #fff;
    border-radius: 12px;
    padding: 2px 6px;
    font-size: 12px;
    margin-left: auto;
}

/* Custom scrollbar styling for sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: #D7E4F6;
    border-radius: 5px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-footer {
    margin-top: 20px;
    padding: 0 20px 20px 20px;
}
.sidebar-footer .sidebar-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    color: #0A4473;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-left: 4px solid transparent;
    transition: color 0.2s ease;
}
.sidebar-footer .sidebar-item:hover {
    color: #1A62B3;
}
.sidebar-footer .sidebar-item i {
    margin-right: 8px;
}
.upgrade-card {
    background: #F1F6FD;
    border: 1px dashed #C9D8EE;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin-top: 20px;
}
.upgrade-card h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #003A8C;
}
.upgrade-card p {
    font-size: 13px;
    margin-bottom: 12px;
    color: #526899;
}
.btn-upgrade {
    display: inline-block;
    background: #1A62B3;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s ease;
}
.btn-upgrade:hover {
    background: #174B8A;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: 60px;
    background: #FFFFFF;
    border-bottom: 1px solid #ECEFF5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}
.header .title {
    font-size: 20px;
    font-weight: bold;
    color: #003A8C;
}
.header .search-container {
    position: relative;
    flex-grow: 1;
    margin: 0 20px;
}
.header .search-container input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #DDE5F8;
    border-radius: 10px;
    background: #F9FCFF;
    color: #0A4473;
    font-size: 14px;
    transition: border-color 0.2s ease;
}
.header .search-container .search-results {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background: #FFFFFF;
    border: 1px solid #DDE5F8;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(10, 68, 115, 0.08);
    z-index: 50;
}
.header .search-container .search-results.visible {
    display: block;
}
.header .search-container .search-result-item {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.header .search-container .search-result-item:hover,
.header .search-container .search-result-item.active {
    background: rgba(10, 68, 115, 0.08);
}
.header .search-container .search-result-title {
    font-size: 14px;
    color: #0A4473;
    font-weight: 600;
}
.header .search-container .search-result-module {
    font-size: 12px;
    color: #5C6A82;
}
.header .search-container .search-highlight {
    background: rgba(255, 210, 0, 0.4);
}
.header .right-icons {
    display: flex;
    align-items: center;
}
.header .right-icons i {
    font-size: 18px;
    margin-left: 16px;
    cursor: pointer;
}
.header .right-icons .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #BBB;
    margin-left: 16px;
}

/* Content */
.content {
    margin-top: 60px;
    margin-left: 260px;
    padding: 20px;
}
.card {
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    padding: 24px;
    margin-bottom: 24px;
}
.card h2 {
    margin-bottom: 16px;
    font-size: 22px;
    color: #0A4473;
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #0A4473;
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #DDE5F8;
    border-radius: 10px;
    font-size: 14px;
    background: #F9FCFF;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus {
    outline: none;
    border-color: #3C8DDE;
    box-shadow: 0 0 0 2px rgba(60, 141, 222, 0.2);
}
.card button {
    background: #1A62B3;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}
.card button:hover {
    background: #174B8A;
    box-shadow: 0 2px 6px rgba(23, 75, 138, 0.3);
}

/* Anchor-styled buttons (toolbar links) should not show underlines */
a.btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    background: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
}
th, td {
    border-bottom: 1px solid #ECEFF5;
    padding: 12px;
    text-align: left;
    font-size: 14px;
}

/* Focus style for search bar */
.header .search-container input:focus {
    outline: none;
    border-color: #3C8DDE;
    box-shadow: 0 0 0 2px rgba(60, 141, 222, 0.2);
}
th {
    background: #F6F9FE;
    font-weight: 600;
    color: #0A4473;
}
tr:nth-child(even) {
    background: #FAFCFF;
}
/* Hover effect for table rows */
tr:hover {
    background: #F0F5FF;
}
.table-card table.has-selection th.select-column,
.table-card table.has-selection td.select-column {
    width: 44px;
    text-align: center;
}
.table-card table.has-selection tbody tr.table-row {
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}
.table-card table.has-selection tbody tr.table-row.row-selected {
    background: #E5EEFF;
    box-shadow: inset 0 0 0 1px rgba(26, 98, 179, 0.35);
}
.table-card table.has-selection tbody tr.table-row.row-selected td {
    border-bottom-color: rgba(26, 98, 179, 0.35);
}
.action-buttons a {
    margin-right: 8px;
    color: #1A62B3;
    text-decoration: none;
    font-size: 14px;
}
.action-buttons a:hover {
    text-decoration: underline;
}

/* Highlight the currently selected subpage link */
/* Highlight the currently selected subpage link */
.sidebar ul li ul li a.current {
    background: #D7E4F6;
    color: #1A62B3;
    font-weight: 600;
    border-left-color: #1A62B3;
}

/* Dynamic module styling */
.page-description {
    margin-bottom: 18px;
    color: #3E5A89;
    font-size: 15px;
}
.page-form {
    border: 1px solid #E2E8F5;
}
.form-section + .form-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px dashed #E2E8F5;
}
.form-section-header {
    margin-bottom: 18px;
}
.form-section-header h3 {
    font-size: 18px;
    color: #103E7A;
    margin-bottom: 4px;
}
.section-subtext {
    font-size: 13px;
    color: #6A7CA7;
}
.form-grid {
    display: grid;
    gap: 16px 20px;
}
.form-grid.columns-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}
.form-grid.columns-2 {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.form-grid.columns-3 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.required {
    color: #E53935;
    margin-left: 4px;
}
.option-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.option-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #0A4473;
    cursor: pointer;
}
.checkbox-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #0A4473;
    cursor: pointer;
}
.form-control-file {
    width: 100%;
    padding: 10px 14px;
    border: 1px dashed #BFD0ED;
    border-radius: 10px;
    background: #F9FCFF;
}
.input-note {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6A7CA7;
}
.date-range {
    display: flex;
    align-items: center;
    gap: 8px;
}
.date-range .form-control {
    flex: 1;
}
.date-range-separator {
    font-size: 13px;
    color: #6A7CA7;
}
.form-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.post-form-content {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: #E6EEF8;
    color: #0A4473;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn i {
    font-size: 14px;
}
.btn:hover {
    background: #D4E4FB;
}
.btn-primary {
    background: #1A62B3;
    color: #fff;
    border-color: #1A62B3;
}
.btn-primary:hover {
    background: #174B8A;
}
.btn-secondary {
    background: #F3F6FD;
    color: #274472;
}
.btn-light {
    background: #F5F8FF;
    color: #1A62B3;
}
.utility-btn {
    background: #EEF3FF;
    color: #274472;
}
.utility-btn:hover {
    background: #DDE8FF;
}
.toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.top-toolbar {
    margin-bottom: 20px;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
    padding: 16px;
    background: #F6F9FE;
    border-radius: 12px;
    border: 1px solid #E0E8F9;
}
.filter-group {
    min-width: 180px;
    flex: 1;
}
.filter-group label {
    display: block;
    font-size: 13px;
    color: #546C9A;
    margin-bottom: 6px;
}
.filter-apply {
    align-self: flex-end;
}
.table-responsive {
    width: 100%;
    overflow-x: auto;
}
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.badge-success {
    background: #E6F4EA;
    color: #1E7E34;
}
.badge-warning {
    background: #FFF4E5;
    color: #B86E00;
}
.badge-danger {
    background: #FCE8E6;
    color: #B53D38;
}
.badge-info {
    background: #E6F0FF;
    color: #0E4CAA;
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
}
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #EDF3FF;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1A62B3;
    font-size: 20px;
}
.stat-title {
    font-size: 13px;
    color: #4C628C;
    margin-bottom: 4px;
}
.stat-trend {
    font-size: 12px;
    color: #1A62B3;
}
.timeline-card {
    margin-top: 24px;
}
.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}
.timeline li {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px dashed #E2E8F5;
}
.timeline li:last-child {
    border-bottom: none;
}
.timeline-time {
    font-size: 12px;
    color: #8093BB;
    min-width: 90px;
}
.timeline-title {
    font-size: 14px;
    font-weight: 600;
    color: #103E7A;
    margin-bottom: 4px;
}
.timeline-detail {
    font-size: 13px;
    color: #5770A0;
}
.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.link-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #E6F0FF;
    border-radius: 10px;
    color: #1A62B3;
    text-decoration: none;
    font-size: 14px;
}
.link-button:hover {
    background: #D4E4FB;
}
.bullet-list {
    margin-left: 18px;
    color: #0A4473;
    font-size: 14px;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    min-width: 220px;
    padding: 12px 16px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(10, 68, 115, 0.18);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.visible {
    opacity: 1;
    transform: translateY(0);
}
.toast-info {
    background: #1A62B3;
}
.toast-success {
    background: #2E7D32;
}
.toast-warning {
    background: #F57C00;
}
.toast-error {
    background: #C62828;
}
