.calendar-col {
    background: #fafdff;
    border-radius: 10px;
    border: 1px solid #00699e;
    box-shadow: 0 2px 8px rgba(15,23,42,0.04);
    padding: 1.2rem 1.1rem 1.2rem 1.1rem;
}
.calendar-header {
    background: #f1f5fa;
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    margin-bottom: 0.7rem;
    box-shadow: 0 1px 4px rgba(15,23,42,0.04);
}
.calendar-title {
    letter-spacing: 0.02em;
}
.calendar-nav {
    font-size: 1.2rem;
    padding: 0.25rem 0.9rem;
    border-radius: 7px;
    border: 1.5px solid var(--primary-color);
    background: #e0e7ff;
    color: var(--primary-color);
    font-weight: 700;
    transition: background 0.13s, color 0.13s, border 0.13s, box-shadow 0.13s;
    box-shadow: 0 1px 3px rgba(15,23,42,0.04);
}
.calendar-nav:hover, .calendar-nav:focus {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-dark);
    outline: none;
}
.calendar-day {
    background: #f3f6fa;
    border: 1px solid #00699e;
    border-radius: 7px;
    margin: 1.5px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    transition: background 0.13s, color 0.13s, border 0.13s;
    cursor: pointer;
    min-height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.calendar-day:hover, .calendar-day:focus {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
    outline: none;
}
.calendar-today {
    background: var(--primary-color) !important;
    color: #fff !important;
    border-color: var(--primary-dark) !important;
    box-shadow: 0 2px 8px rgba(26,86,219,0.10);
}
.calendar-dot {
    margin-left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
    border: 1.5px solid #fff;
    box-shadow: 0 1px 2px rgba(15,23,42,0.08);
}
.calendar-events-col {
    background: #fafdff;
    border-radius: 10px;
    border: 1px solid #00699e;
    box-shadow: 0 2px 8px rgba(15,23,42,0.04);
    padding: 1.2rem 1.1rem 1.2rem 1.1rem;
}
.calendar-events-header {
    background: #f1f5fa;
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    margin-bottom: 0.7rem;
    box-shadow: 0 1px 4px rgba(15,23,42,0.04);
}
#calendar-events-list li {
    border-radius: 6px;
    transition: background 0.13s;
    cursor: pointer;
}
#calendar-events-list li:hover {
    background: #e0e7ff;
}
.calendar-event-date {
    color: #6b7280;
    font-size: 0.93em;
    margin-left: 0.5em;
}
.calendar-modal {
    min-width: 340px;
    max-width: 98vw;
    padding: 2rem 2rem 1.2rem 2rem;
}
.calendar-modal-title {
    color: var(--primary-color);
    font-size: 1.18rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    letter-spacing: 0.01em;
}
.calendar-modal-body {
    font-size: 1.05rem;
    margin-bottom: 1.3rem;
}
.calendar-modal-body form label {
    font-weight: 700;
    color: #374151;
    font-size: 0.98rem;
}
.calendar-modal-body input[type="text"],
.calendar-modal-body input[type="date"],
.calendar-modal-body input[type="color"] {
    width: 100%;
    padding: 0.45rem 0.7rem;
    border-radius: 7px;
    border: 1.5px solid #00699e;
    margin-top: 0.18rem;
    margin-bottom: 0.9rem;
    font-size: 1rem;
    background: #f8fafc;
    transition: border 0.13s;
}
.calendar-modal-body input:focus {
    border-color: var(--primary-color);
    outline: none;
}
.calendar-modal-actions .btn {
    min-width: 90px;
}
/* Calendar Two-Column Layout & Modal */
.calendar-flex-wrap {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}
.calendar-col {
    flex: 1 1 340px;
    min-width: 320px;
}
.calendar-events-col {
    flex: 1 1 260px;
    min-width: 240px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #00699e;
    padding: 1.1rem 1rem 1.1rem 1.2rem;
    box-shadow: 0 2px 8px rgba(15,23,42,0.04);
}
.calendar-events-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
}
#calendar-events-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
#calendar-events-list li {
    padding: 0.5rem 0.2rem;
    font-size: 0.98rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid #00699e;
}
#calendar-events-list li:last-child {
    border-bottom: none;
}
.calendar-event-date {
    color: #888;
    font-size: 0.92em;
    margin-left: 0.5em;
}

/* Modal Styles */
.calendar-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15,23,42,0.18);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.calendar-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(15,23,42,0.13);
    min-width: 320px;
    max-width: 95vw;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    position: relative;
    animation: fadeInModal 0.18s;
}
@keyframes fadeInModal {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: none; }
}
.calendar-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
}
.calendar-modal-body {
    margin-bottom: 1.2rem;
    font-size: 1rem;
}
.calendar-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.7rem;
}
/* Calendar Styles */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.calendar-title {
    flex: 1;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}
.calendar-nav {
    background: var(--primary-light);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 6px;
    font-size: 1.1rem;
    padding: 0.2rem 0.7rem;
    cursor: pointer;
    transition: background 0.13s;
}
.calendar-nav:hover {
    background: var(--primary-color);
    color: #fff;
}
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    font-size: 0.95rem;
    color: #374151;
    margin-bottom: 0.2rem;
    text-align: center;
    font-weight: 700;
}
.calendar-weekdays span {
    padding: 0.2rem 0;
}
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.1rem;
}
.calendar-day {
    min-height: 38px;
    min-width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    background: #f8fafc;
    border-radius: 7px;
    margin: 1px;
    position: relative;
    cursor: pointer;
    transition: background 0.13s, color 0.13s;
}
.calendar-day:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}
.calendar-today {
    background: var(--primary-color);
    color: #fff;
}
.calendar-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-left: 5px;
    vertical-align: middle;
}
:root {
    --primary-color: #0369a1;
    --primary-dark: #075985;
    --primary-light: #e0f2fe;
    --secondary-color: #4b5563;
    --success-color: #057a55;
    --danger-color: #c81e1e;
    --warning-color: #906103;
    --background-color: #ffffff;
    --content-bg: #f1f5f9;
    --sidebar-bg: #f1f5f9;
    --sidebar-text: #334155;
    --sidebar-hover: rgba(15,23,42,0.06);
    --sidebar-divider: rgba(15,23,42,0.07);
    --text-main: #0f172a;
    --text-muted: #4b5563;
    --border-color: rgba(15,23,42,0.06);
    --sidebar-width: clamp(186px, 13.5vw, 252px);
    --topbar-height: 52px;
    --card-shadow: 0 2px 12px rgba(15,23,42,0.07);
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-width: 1024px;
    overflow-x: hidden;
}

html {
    /* Slightly tighter global scale for denser desktop UI */
    font-size: clamp(14.2px, 0.96vw, 15.9px);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

body {
    font-family: 'Outfit', 'Segoe UI', sans-serif;
    background-color: var(--content-bg);
    color: var(--text-main);
    line-height: 1.4;
    font-size: 0.87rem;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: 2px 0 12px rgba(15,23,42,0.08);
    border-right: 1px solid rgba(15,23,42,0.08);
}

.sidebar-header {
    display: flex;
    flex-direction: column;
    padding: 0.8rem 1rem 0;
    background: var(--primary-color);
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    gap: 0.6rem;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.sidebar-brand-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.sidebar-org-name {
    font-size: 1.25rem;
    font-weight: 900;
    color: #fff;
    text-transform: none;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.sidebar-dt-strip {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(0,0,0,0.15);
    border-radius: 6px 6px 0 0;
    padding: 0.3rem 0.7rem;
    margin: 0 -1rem;
    justify-content: space-between;
}

.sidebar-dt-date {
    font-size: 0.67rem;
    color: rgba(255,255,255,0.82);
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.sidebar-dt-sep {
    width: 1px;
    height: 12px;
    background: rgba(255,255,255,0.25);
    margin: 0 0.5rem;
    flex-shrink: 0;
}

.sidebar-dt-time {
    font-size: 0.72rem;
    color: #fff;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.sidebar-datetime {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
}

.sidebar-nav {
    flex: 1;
    padding: 0.3rem 0.4rem 0.45rem;
    overflow-y: auto;
}

.sidebar-nav ul li {
    border-bottom: none;
}

.sidebar-nav ul li a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.56rem 0.72rem;
    color: var(--sidebar-text);
    font-weight: 500;
    font-size: 0.86rem;
    line-height: 1.2;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    border-radius: 7px;
    border: 1px solid transparent;
    margin-bottom: 2px;
    text-transform: none !important;
}

.sidebar-nav ul li a i {
    width: 16px;
    font-size: 0.88rem;
    opacity: 0.68;
    flex-shrink: 0;
}

.sidebar-nav ul li a:hover {
    background-color: #e7eef6;
    color: var(--primary-color);
    border-color: #d7e2ef;
}

.sidebar-nav ul li a:hover i {
    opacity: 1;
}

.sidebar-nav ul li.active a {
    background-color: #dbeafe;
    color: #1e3a8a;
    font-weight: 700;
    border-color: #bfdbfe;
}

.sidebar-nav ul li.active a i {
    opacity: 1;
}

.nav-divider {
    font-size: 0.69rem;
    text-transform: none !important;
    background: #e2e8f0;
    color: #64748b;
    padding: 0.3rem 0.72rem !important;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid #d5dee8;
    border-radius: 6px;
    margin: 0.38rem 0.1rem 0.24rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    width: calc(100vw - var(--sidebar-width));
    min-width: 0;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.2s ease, width 0.2s ease;
}

.two-column-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    align-items: stretch;
}

.two-column-grid .card {
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.two-column-grid .card .chart-container,
.two-column-grid .card .table-container,
.two-column-grid .card > div:last-child {
    flex: 1;
}

.top-bar {
    height: var(--topbar-height);
    background-color: white;
    border-bottom: 1px solid rgba(15,23,42,0.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 1px 6px rgba(15,23,42,0.05);
}

.page-title h1 {
    font-size: 1.04rem;
    font-weight: 700;
    text-transform: uppercase;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}


/* Unified Top Navbar Button Styles */
.top-bar .btn-refresh,
.top-bar .user-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.42rem 0.9rem;
    border-radius: 8px;
    border: 1.5px solid var(--primary-color);
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.78rem;
    transition: background 0.14s, color 0.14s, border 0.14s;
    text-decoration: none;
    box-shadow: none;
    outline: none;
}

.top-bar .btn-refresh:hover,
.top-bar .user-info:hover {
    background: var(--primary-dark);
    color: #fff;
    border-color: var(--primary-dark);
    box-shadow: none;
    transform: none;
}

.top-bar .btn-refresh:active,
.top-bar .user-info:active {
    filter: brightness(0.96);
    background: var(--primary-dark);
    color: #fff;
    border-color: var(--primary-dark);
}

.top-bar .btn-refresh i,
.top-bar .user-info i {
    color: #fff;
    font-size: 1rem;
}

.top-bar .user-info {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}
.top-bar .user-info:hover,
.top-bar .user-info:active {
    background: #374151;
    border-color: #374151;
    color: #fff;
}

.user-info img {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
}

.content-wrapper {
    padding: 1rem 1.25rem;
    width: min(100%, 1600px);
    margin: 0 auto;
}

/* Cards / Sections */
.card {
    background: #ffffff;
    border: 2.5px solid #222b3a;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    box-shadow: none;
}

.card.section-card {
    border-color: rgba(15,23,42,0.2);
}

.card-title {
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    background: transparent;
    margin: 0;
    padding: 0.5rem 0;
}

.form-section {
    margin-bottom: 0.75rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.form-section h3 {
    font-size: 0.82rem;
    margin: 0 0 0.55rem;
    padding: 0;
    font-weight: 700;
    color: #111827;
    text-transform: uppercase;
    border: none;
    background: transparent;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
}

.form-group label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    margin-bottom: 0.18rem;
    color: #111827;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid rgba(15,23,42,0.08);
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    font-size: 0.86rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 6px 18px rgba(26,37,80,0.06);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.45rem 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-family: inherit;
    text-transform: uppercase;
    font-size: 0.7rem;
    border-radius: 10px;
}

.card { 
    background: #fff;
    border: 1px solid rgba(15,23,42,0.08);
    padding: 0.9rem 1.1rem;
    margin-bottom: 0.9rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 12px rgba(15,23,42,0.06);
}

.card.section-card {
    border-color: rgba(15,23,42,0.22);
}

.card-title span {
    font-size: 0.9rem;
    font-weight: 700;
}

.card-title > div a {
    font-size: 0.95rem;
    padding: 0.5rem 0.9rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.card .form-actions {
    display: flex;
    gap: 0.4rem;
    justify-content: flex-end;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    background: transparent;
    border: none;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.form-group {
    margin-bottom: 0.5rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #000;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(15,23,42,0.22);
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    font-size: 0.82rem;
    transition: box-shadow 0.12s ease, border-color 0.12s ease, background-color 0.12s ease;
    color: var(--text-main);
}

/* stronger visible border for inputs and accessible focus background */
input.form-control:focus, textarea.form-control:focus, select.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #f8faff;
    box-shadow: 0 0 0 3px rgba(26,86,219,0.08), 0 2px 8px rgba(15,23,42,0.06);
}

/* also support keyboard focus visible state */
input.form-control:focus-visible, textarea.form-control:focus-visible, select.form-control:focus-visible {
    box-shadow: 0 12px 30px rgba(15,23,42,0.14);
}

/* placeholder color slightly darker for better readability */
.form-control::placeholder {
    color: #6b7280;
}

/* Member form: preserve natural text casing and compact rhythm */
.member-form {
    text-transform: none;
    letter-spacing: normal;
}

.member-form label,
.member-form .form-section h3,
.member-form .card-title span,
.member-form .mini-stat-label,
.member-form .mini-stat-value,
.member-form .member-suggestion-item,
.member-form .btn {
    text-transform: none;
}

.member-form input.form-control,
.member-form textarea.form-control,
.member-form select.form-control {
    text-transform: none;
}

.member-form input.form-control::placeholder,
.member-form textarea.form-control::placeholder {
    text-transform: none;
    color: #6b7280;
}

.member-form .card-title > div a {
    text-transform: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.45rem 0.8rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-family: inherit;
    text-transform: uppercase;
    font-size: 0.82rem;
    border-radius: 10px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(26,86,219,0.15);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,86,219,0.2);
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #111827;
    border: 1px solid rgba(15,23,42,0.12);
    box-shadow: none;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

.profile-page {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0;
}

.profile-card {
    width: min(100%, 720px);
    max-width: 720px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.profile-avatar {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(3,105,161,0.12);
    color: var(--primary-color);
    font-size: 2rem;
}

.profile-header-text {
    min-width: 0;
}

.profile-subtitle {
    margin: 0.25rem 0 0;
    color: #475569;
    font-size: 0.94rem;
    line-height: 1.5;
}

.profile-section-title {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: #334155;
    letter-spacing: 0.02em;
}

.profile-actions {
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.profile-actions .btn {
    min-width: 120px;
}

@media (max-width: 768px) {
    .profile-page {
        padding: 0.75rem 0.5rem;
    }

    .profile-card {
        width: 100%;
        padding: 1rem;
    }

    .profile-header {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-avatar {
        width: 48px;
        height: 48px;
        font-size: 1.6rem;
        margin-bottom: 0.5rem;
    }

    .profile-subtitle {
        font-size: 0.92rem;
    }

    .form-control {
        font-size: 0.95rem;
        padding: 0.75rem 0.9rem;
    }

    .form-group label {
        font-size: 0.78rem;
    }

    .profile-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-actions .btn {
        width: 100%;
    }
}

.btn-success {
    background-color: #059669;
    color: white;
    box-shadow: 0 2px 8px rgba(5,150,105,0.15);
}

.btn-success:hover {
    background-color: #047857;
    transform: translateY(-1px);
}

.btn-warning {
    background-color: #d97706;
    color: white;
    box-shadow: 0 2px 8px rgba(217,119,6,0.15);
}

.btn-warning:hover {
    background-color: #b45309;
    transform: translateY(-1px);
}

.btn-light {
    background-color: #f3f4f6;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

.btn-light:hover {
    background-color: #e9ecf0;
    border-color: #cbd5e1;
}

.btn-sm {
    padding: 0.36rem 0.72rem;
    font-size: 0.76rem;
}

.member-suggestion-item:hover {
    background-color: #f3f4f6;
}

.member-suggestion-item:last-child {
    border-bottom: none;
}

/* Tables - COMPACT */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid rgba(15,23,42,0.06);
    border-radius: var(--border-radius);
    overflow: hidden;
}

th {
    text-align: left;
    padding: 0.6rem;
    background-color: var(--primary-dark);
    color: #dbeafe;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
}

td {
    padding: 0.6rem;
    border-bottom: 1px solid #9ca3af;
    font-size: 0.88rem;
}

tr:nth-child(even) td {
    background-color: #f9fafb;
}

tbody tr[data-deleted="1"] td,
tbody tr[data-deleted="1"]:nth-child(even) td {
    background-color: #fee2e2 !important;
}

tbody tr:hover td {
    background-color: #fef9c3 !important;
}

/* Login Page */
.login-body {
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-card {
    background: white;
    width: 100%;
    max-width: 380px;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.login-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-header .logo {
    justify-content: center;
    color: #000;
    margin-bottom: 0.5rem;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: #ffffff;
    padding: 1rem;
    border: 2.5px solid #222b3a;
    border-radius: 16px;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.stat-card h3 {
    font-size: 0.78rem;
    color: #4b5563;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.stat-card p {
    font-size: 1.25rem;
    font-weight: 900;
    color: #111827;
}

.card.card-focus,
.card:hover,
.stat-card:hover {
    transform: none;
    box-shadow: none;
}

.card-title {
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-table {
    border: 1px solid rgba(15,23,42,0.08);
    border-radius: 12px;
}

.card-table th,
.card-table td {
    padding: 0.6rem;
}

.compact-transactions-table tr:hover td {
    background: rgba(59,130,246,0.06);
}

.stat-icon {
    font-size: 1.2rem;
    color: #000;
}

.stat-info h3 {
    font-size: 0.75rem;
    color: #4b5563;
    font-weight: 700;
    text-transform: uppercase;
}

.stat-info p {
    font-size: 1.25rem;
    font-weight: 800;
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.alert-danger {
    background-color: var(--danger-color);
    color: #fff;
}

/* Status Badges */
.status-badge {
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    border: 1px solid rgba(15,23,42,0.06);
    display: inline-block;
    border-radius: 8px;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-paid {
    background: #dcfce7;
    color: #166534;
}

.status-unpaid {
    background: #fee2e2;
    color: #991b1b;
}

.status-pending {
    background: #fef9c3;
    color: #854d0e;
}

.status-completed {
    background: #dbeafe;
    color: #1e40af;
}

.status-defaulted {
    background: #fee2e2;
    color: #991b1b;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    pointer-events: none;
}

.toast {
    background: #000;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(15,23,42,0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.06);
    pointer-events: auto;
    min-width: 300px;
    justify-content: space-between;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast .close-toast {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    line-height: 1;
}

.toast .close-toast:hover {
    color: #fff;
}

/* Custom Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15,23,42,0.18);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.custom-modal {
    background: #fff;
    padding: 1.5rem;
    border: 2.5px solid #222b3a;
    width: 100%;
    max-width: 520px;
    transform: none;
    transition: transform 0.12s ease, opacity 0.12s ease;
    box-shadow: none;
    border-radius: calc(var(--border-radius) - 4px);
}

.modal-overlay.show .custom-modal {
    transform: none;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: #000;
}

.modal-message {
    color: #4b5563;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
    }

    .top-bar {
        padding: 0 0.5rem;
    }

    .content-wrapper {
        padding: 0.5rem;
    }
            background-color: #e0edfd !important; /* subtle light blue background */
    .form-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-stats,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .user-profile .user-info span {
        display: none;
    }

    .user-profile {
        gap: 0.5rem;
    }

    .btn-refresh {
        margin-right: 0.5rem;
        padding: 4px 8px;
    }
}

@media (min-width: 1280px) {
    .content-wrapper {
        width: min(100%, 1500px);
    }
}

@media (min-width: 1680px) {
    .content-wrapper {
        width: min(100%, 1800px);
    }
}
