/* ITELORUN MUSLIM COOPERATIVE MANAGEMENT SYSTEM
   Bespoke Design System: Emerald, Gold, Slate & Glassmorphism
   Typography: Inter & Outfit
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
    /* Palette Tokens */
    --primary: #0a0f0d;
    --primary-light: #1b1f1e;
    --primary-dark: #041f15;
    --primary-glow: rgba(10, 77, 52, 0.25);

    --accent-gold: #c99700;
    --accent-gold-light: #e5b326;
    --accent-gold-soft: rgba(201, 151, 0, 0.12);

    --bg-main: #f4f7f6;
    --bg-card: #ffffff;
    --bg-sidebar: #1b1f1e;
    --bg-glass: rgba(255, 255, 255, 0.85);

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-white: #ffffff;

    --border: #e2e8f0;
    --border-focus: #1a2a24;

    --success: #10b981;
    --success-soft: #ecfdf5;
    --danger: #ef4444;
    --danger-soft: #fef2f2;
    --warning: #f59e0b;
    --warning-soft: #fffbeb;
    --info: #0284c7;
    --info-soft: #f0f9ff;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-glow: 0 0 20px var(--primary-glow);

    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Login Page Styles */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 10% 20%, #063322 0%, #0a4d34 45%, #052417 100%);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.login-body::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(201, 151, 0, 0.15) 0%, transparent 70%);
    top: -150px;
    right: -150px;
    border-radius: 50%;
    filter: blur(40px);
}

.login-card {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    width: 100%;
    max-width: 440px;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 2.75rem 2.25rem;
    z-index: 10;
    animation: fadeInScale 0.4s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.brand-header {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--accent-gold);
    border-radius: 20px;
    font-size: 1.75rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 8px 16px rgba(10, 77, 52, 0.35);
    border: 2px solid var(--accent-gold);
    margin-bottom: 1rem;
}

.brand-title {
    font-size: 1.35rem;
    color: var(--primary-dark);
    line-height: 1.25;
}

.brand-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 1.35rem;
}

.form-label {
    display: block;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background-color: #f8fafc;
    color: var(--text-primary);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    background-color: #ffffff;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(10, 77, 52, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-dark) 100%);
    box-shadow: 0 6px 16px rgba(10, 77, 52, 0.4);
    transform: translateY(-1px);
}

.btn-block {
    width: 100%;
}

/* Alerts / Flash Banners */
.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.alert-danger {
    background-color: var(--danger-soft);
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: var(--success-soft);
    color: #047857;
    border: 1px solid #a7f3d0;
}

/* Layout Architecture */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 270px;
    background-color: var(--bg-sidebar);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #a47b00 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
}

.sidebar-brand-text h2 {
    font-size: 1rem;
    color: #ffffff;
    line-height: 1.2;
}

.sidebar-brand-text p {
    font-size: 0.72rem;
    color: var(--accent-gold-light);
    letter-spacing: 0.05em;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 0.75rem;
}

.nav-section-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    font-weight: 700;
    padding: 0.75rem 0.75rem 0.35rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    margin-bottom: 0.25rem;
    transition: var(--transition);
}

.nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
    color: #ffffff;
    background: linear-gradient(90deg, var(--primary-light) 0%, rgba(15, 104, 71, 0.6) 100%);
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    border-left: 3px solid var(--accent-gold);
}

.nav-icon {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background-color: rgba(0, 0, 0, 0.15);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 1.5px solid var(--accent-gold);
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.72rem;
    color: #94a3b8;
}

/* Main Content Area */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Header */
.top-header {
    height: 70px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-scope-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    background-color: var(--accent-gold-soft);
    color: #855f00;
    border: 1px solid rgba(201, 151, 0, 0.3);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.content-body {
    padding: 2rem;
    flex: 1;
}

/* Metric Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.35rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(10, 77, 52, 0.2);
}

.stat-info h3 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-dark);
    font-family: 'Outfit', sans-serif;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.emerald {
    background-color: rgba(10, 77, 52, 0.1);
    color: var(--primary);
}

.stat-icon.gold {
    background-color: var(--accent-gold-soft);
    color: var(--accent-gold);
}

.stat-icon.blue {
    background-color: var(--info-soft);
    color: var(--info);
}

.stat-icon.purple {
    background-color: #f5f3ff;
    color: #7c3aed;
}

/* Content Cards */
.card {
    background-color: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fafbfb;
}

.card-title {
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.card-body {
    padding: 1.5rem;
}

/* Quick Action Buttons */
.quick-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.btn-outline {
    background-color: #ffffff;
    border: 1.5px solid var(--border);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
    background-color: rgba(10, 77, 52, 0.04);
}