/* ChurchSMS - Main Stylesheet */
:root {
    --primary: #1B5E20;
    --primary-light: #2E7D32;
    --primary-dark: #0D3B12;
    --gold: #D4A017;
    --gold-light: #F5D060;
    --bg-light: #F4F6F8;
    --sidebar-bg: #0D3B12;
    --sidebar-width: 260px;
    --topbar-height: 60px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-light);
    margin: 0;
    padding: 0;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
}

.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-card .logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-card .logo i {
    font-size: 48px;
    color: var(--primary);
}

.login-card .logo h2 {
    color: var(--primary);
    margin-top: 8px;
    font-weight: 700;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: #fff;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.sidebar-brand i { color: var(--gold); }

.sidebar-nav {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-left-color: var(--gold);
}

.sidebar-nav li a i { font-size: 18px; width: 20px; text-align: center; }
.sidebar-divider { border-top: 1px solid rgba(255,255,255,0.1); margin: 10px 0; }

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-title { font-weight: 600; font-size: 16px; color: #333; }

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.topbar-user .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.content-area { padding: 24px; }

/* Dashboard Cards */
.dash-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid var(--primary);
    transition: transform 0.2s;
}

.dash-card:hover { transform: translateY(-2px); }
.dash-card h3 { font-size: 28px; font-weight: 700; color: var(--primary); margin: 0; }
.dash-card p { font-size: 13px; color: #666; margin: 4px 0 0; }
.dash-card .icon { font-size: 32px; color: var(--gold); }

.dash-card.gold { border-left-color: var(--gold); }
.dash-card.green { border-left-color: var(--primary); }
.dash-card.blue { border-left-color: #1565C0; }
.dash-card.red { border-left-color: #C62828; }

/* Tables */
.table-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

.table-card .table-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.table-card .table-header h5 { margin: 0; font-weight: 600; }

.table-card table { margin: 0; }
.table-card table th { font-size: 13px; font-weight: 600; color: #555; border-top: none; }
.table-card table td { font-size: 14px; vertical-align: middle; }

/* Status badges */
.badge-trial { background: #FFF3E0; color: #E65100; }
.badge-active { background: #E8F5E9; color: #1B5E20; }
.badge-expired { background: #FFEBEE; color: #C62828; }
.badge-suspended { background: #FCE4EC; color: #880E4F; }
.badge-lifetime { background: #E3F2FD; color: #0D47A1; }

/* Warning banner */
.grace-warning {
    background: #FFF3E0;
    border: 1px solid #FFB74D;
    color: #E65100;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Forms */
.form-card {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    .sidebar.show + .sidebar-overlay { display: block; }
}

/* Buttons */
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-light); border-color: var(--primary-light); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #000; }
.btn-gold:hover { background: var(--gold-light); border-color: var(--gold-light); }
