/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --primary-color: #1e3a8a;
    /* Deep Blue / Indigo */
    --primary-light: #2563eb;
    --secondary-bg: #f5f7fb;
    /* Soft Gray Background */
    --white: #ffffff;
    --accent-green: #10b981;
    /* Emerald Green */
    --accent-red: #ef4444;
    /* Soft Red */
    --text-dark: #111827;
    /* Dark Gray */
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 70px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--secondary-bg);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Layout Wrapper */
.wrapper {
    display: flex;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--white);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: var(--transition-speed);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-menu {
    padding: 20px 0;
    flex: 1;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition-speed);
    gap: 12px;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    color: var(--primary-color);
    background-color: #eff6ff;
    /* Very soft blue */
    border-right: 3px solid var(--primary-color);
}

.sidebar-menu i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Topbar */
.topbar {
    height: var(--header-height);
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 900;
}

.topbar-left {
    display: flex;
    align-items: center;
}

.menu-toggle {
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 20px;
    display: none;
    /* Hidden on desktop */
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.admin-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.logout-btn {
    color: var(--accent-red);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 4px;
    transition: 0.2s;
}

.logout-btn:hover {
    background-color: #fef2f2;
}

/* Page Content */
.content {
    padding: 30px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-title {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: white;
    color: var(--text-dark);
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-danger {
    background-color: #fee2e2;
    color: var(--accent-red);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.btn-danger:hover {
    background-color: #fecaca;
}


/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background-color: #eff6ff;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 1.8rem;
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
    /* Numbers should be Inter */
    font-weight: 700;
    line-height: 1.2;
}

.stat-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Dashboard Bottom Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    padding: 25px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 12px 15px;
    color: var(--primary-color);
    /* Corrected from requirements, usually muted but let's make it look nice */
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 15px;
    color: var(--text-dark);
    font-size: 0.95rem;
    border-bottom: 1px solid #f3f4f6;
}

tr:hover td {
    background-color: #f9fafb;
}

.balance-highlight {
    color: var(--accent-green);
    font-weight: 700;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-credit {
    background-color: #d1fae5;
    color: #065f46;
}

.status-debit {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Quick Actions */
.quick-actions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    color: var(--text-dark);
    font-weight: 500;
    transition: 0.2s;
    border: 1px solid transparent;
}

.action-btn:hover {
    background: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-soft);
}

.action-btn i {
    margin-right: 15px;
    font-size: 1.2rem;
}

/* Members Page */
.search-box {
    position: relative;
}

.search-box input {
    padding: 10px 15px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    outline: none;
    width: 250px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.info-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Mobile Restriction Styles */
.mobile-restriction {
    display: none;
    /* Hidden on desktop */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--primary-color);
    color: white;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.restriction-content .logo-large {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--accent-green);
    animation: float 3s ease-in-out infinite;
}

.restriction-content h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.restriction-content p {
    font-size: 1.1rem;
    margin-bottom: 5px;
    opacity: 0.9;
}

.restriction-content .sub-text {
    font-size: 0.9rem;
    opacity: 0.7;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Enforce Restriction on Mobile/Tablets */
@media (max-width: 900px) {
    .mobile-restriction {
        display: flex;
        /* Show overlay */
    }

    .wrapper {
        display: none !important;
        /* Hide application */
    }
}

/* Remove previous mobile responsive tweaks that are no longer needed since we are blocking it */
/* Responsive */
@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}