/*
 * FILE: css/style.css - Master Stylesheet
 * VERSION: 4.0.0 - Unified & Complete
 * PURPOSE: Complete styling system for OurFamilyGrid
 * INCLUDES: Base, Dashboard, Public, Household, Admin, Finance, Profile
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ==========================================
   1. CSS VARIABLES (Design System)
   ========================================== */
:root {
    /* Primary Palette */
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-light: rgba(139, 92, 246, 0.2);
    --accent: #06b6d4;
    --accent-light: rgba(6, 182, 212, 0.2);

    /* Status Colors */
    --success: #22c55e;
    --success-light: rgba(34, 197, 94, 0.2);
    --danger: #f43f5e;
    --danger-hover: #dc2626;
    --danger-light: rgba(244, 63, 94, 0.2);
    --warning: #fbbf24;
    --warning-light: rgba(251, 191, 36, 0.2);
    --info: #06b6d4;

    /* Text Colors */
    --text-main: #f8fafc;
    --text-light: #cbd5e1;
    --text-muted: #94a3b8;
    --text-dark: #0f172a;

    /* Backgrounds */
    --bg-body: linear-gradient(135deg, #0f172a 0%, #312e81 100%);
    --bg-card: rgba(30, 41, 59, 0.8);
    --bg-card-hover: rgba(30, 41, 59, 0.9);
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-bg-dark: rgba(15, 23, 42, 0.6);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --glass-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* ==========================================
   1b. THEME VARIATIONS
   ========================================== */

/* DARK THEME (Neutral dark - no purple) */
body.dark-theme {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: rgba(59, 130, 246, 0.2);
    --accent: #06b6d4;
    --accent-light: rgba(6, 182, 212, 0.2);

    --bg-body: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --bg-card: rgba(30, 41, 59, 0.8);
    --bg-card-hover: rgba(30, 41, 59, 0.9);
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-bg-dark: rgba(15, 23, 42, 0.6);

    --text-main: #f8fafc;
    --text-light: #cbd5e1;
    --text-muted: #94a3b8;
}

/* LIGHT THEME */
body.light-theme {
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-light: rgba(139, 92, 246, 0.15);
    --accent: #06b6d4;
    --accent-light: rgba(6, 182, 212, 0.15);

    --success: #16a34a;
    --success-light: rgba(22, 163, 74, 0.15);
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --danger-light: rgba(220, 38, 38, 0.15);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.15);

    --text-main: #0f172a;
    --text-light: #334155;
    --text-muted: #64748b;
    --text-dark: #f8fafc;

    --bg-body: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-bg-dark: rgba(248, 250, 252, 0.7);
    --glass-border: 1px solid rgba(0, 0, 0, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    --glass-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Light theme scrollbar */
body.light-theme ::-webkit-scrollbar-track {
    background: #f1f5f9;
}

body.light-theme ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}

body.light-theme ::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================
   2. RESET & GLOBAL STYLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-body);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-main);
    padding-top: 0;
    padding-bottom: 50px;
    padding-left: 0;
    padding-right: 0;
    line-height: 1.6;
}

/* Admin body override - no padding */
body.admin-view {
    padding: 0 !important;
    margin: 0 !important;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* Font Awesome Icon Defaults */
i.fa,
i.fas,
i.far,
i.fab,
i.fa-solid,
i.fa-regular,
i.fa-brands {
    display: inline-block;
    font-style: normal;
    line-height: 1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ==========================================
   3. LAYOUT CONTAINERS
   ========================================== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.content {
    margin-top: 20px;
}

.content h3 {
    color: var(--text-main);
    margin-bottom: 20px;
    font-weight: 600;
}

.content-wrapper {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    border: var(--glass-border);
}

/* ==========================================
   4. NAVIGATION - Handled by navbar.php component
   ========================================== */

/* Override old navbar styles - handled in navbar component */
.public-navbar {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0);
    width: 90%;
    max-width: 1100px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 30px;
    border-radius: 50px;
    border: var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.navbar-brand {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand .highlight,
.logo .highlight {
    color: var(--accent);
}

.logo i,
.navbar-brand i {
    font-size: 20px;
}

.nav-links,
.public-nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-item,
.public-nav-links a {
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item i,
.public-nav-links a i {
    font-size: 14px;
}

.nav-item:hover,
.public-nav-links a:hover {
    background: var(--glass-bg);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
}

.auth-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Navbar user controls */
.nav-user {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-icon-nav,
.btn-logout {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.btn-icon-nav:hover,
.btn-logout:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: scale(1.1);
}

.btn-logout:hover {
    background: var(--danger);
    border-color: var(--danger);
}

/* ==========================================
   5. BUTTONS
   ========================================== */
.btn,
.btn-primary,
.btn-save {
    background: var(--primary);
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    display: inline-block;
    font-size: 14px;
}

.btn:hover,
.btn-primary:hover,
.btn-save:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-hover);
}

.btn-warning {
    background: var(--warning);
    color: var(--text-dark);
}

.btn-small,
.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 20px;
}

.btn-cta {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white !important;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
    font-size: 14px;
    display: inline-block;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
}

/* Icon Buttons */
.btn-delete,
.btn-action {
    background: var(--danger);
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    font-weight: 500;
    display: inline-block;
    white-space: nowrap;
}

.btn-delete:hover,
.btn-action:hover {
    background: var(--danger-hover);
    transform: scale(1.05);
}

.btn-delete-mini,
.btn-icon-nav {
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-delete-mini:hover,
.btn-icon-nav:hover {
    transform: scale(1.1);
    background: var(--danger-hover);
}

/* ==========================================
   6. TABS & NAVIGATION TABS
   ========================================== */
.tabs {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.tab,
.tab-btn {
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-muted);
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
}

.tab:hover,
.tab-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.tab.active,
.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Version tabs for roadmap */
.version-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

/* ==========================================
   7. SECTIONS & VISIBILITY
   ========================================== */
.section,
.tab-content,
.version-content,
.admin-section {
    display: none;
}

.section.active,
.tab-content.active,
.version-content.active,
.admin-section.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInAdmin {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   8. CARDS
   ========================================== */
.card,
.data-card,
.marketing-card,
.admin-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--glass-shadow);
    border: var(--glass-border);
    color: var(--text-main);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover,
.marketing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glass-shadow-hover);
}

.admin-card {
    background: var(--bg-card) !important;
}

/* Marketing Cards */
.marketing-card {
    text-align: center;
    padding: 40px;
    border-radius: 30px;
}

.marketing-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-10px);
}

.marketing-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Card Headers */
.card-header,
.card-header-styled {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header h2,
.card-header h3,
.card-header-styled h3 {
    color: var(--text-main);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 5px;
}

.card-body {
    padding: 0;
}

/* Version/Feature Cards */
.version-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    border: var(--glass-border);
}

.version-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.version-header h3 {
    color: white;
    font-size: 1.4rem;
    margin: 0;
}

/* ==========================================
   9. STATS & SUMMARY CARDS
   ========================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    box-shadow: var(--glass-shadow);
    border: var(--glass-border);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
}

.stat-card .number {
    font-size: 42px;
    font-weight: 700;
    color: white;
}

/* Summary Cards (Finance) */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmin(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    box-shadow: var(--glass-shadow);
    border: var(--glass-border);
    transition: transform 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
}

.summary-card h3 {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.summary-card .amount {
    font-size: 32px;
    font-weight: 700;
    color: white;
}

.summary-card.income {
    border-left: 4px solid var(--success);
}

.summary-card.income .amount {
    color: var(--success);
}

.summary-card.expense {
    border-left: 4px solid var(--danger);
}

.summary-card.expense .amount {
    color: var(--danger);
}

.summary-card.networth .amount,
.summary-card.total .amount {
    color: var(--primary);
}

/* ==========================================
   10. TABLES
   ========================================== */
.data-table {
    width: 100%;
    background: transparent;
    border-radius: 16px;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead {
    background: rgba(139, 92, 246, 0.2);
}

.data-table th {
    padding: 15px;
    text-align: left;
    color: var(--text-main);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.data-table tbody tr {
    transition: background 0.2s ease;
    background: var(--glass-bg);
}

.data-table tbody tr:hover {
    background: var(--primary-light);
}

/* Table action column */
.data-table td:last-child {
    width: 100px;
    text-align: center;
}

.data-table .btn-delete {
    margin: 0 auto;
}

/* Admin Tables - Specific styling */
#admin-users-list .data-table,
#admin-coupons-list .data-table {
    border-spacing: 0 10px;
}

#admin-users-list .data-table th,
#admin-coupons-list .data-table th {
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#admin-users-list .data-table td,
#admin-coupons-list .data-table td {
    background: var(--bg-card) !important;
    color: white !important;
    padding: 18px 20px;
    border: none;
}

#admin-users-list .data-table tr td:first-child,
#admin-coupons-list .data-table tr td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

#admin-users-list .data-table tr td:last-child,
#admin-coupons-list .data-table tr td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Comparison Table (Pricing) */
.comparison-table {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 80px;
    border-collapse: separate;
    border-spacing: 0;
}

.comparison-table th {
    text-align: center;
    padding: 20px;
    color: white;
    font-size: 1.2rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.comparison-table td {
    padding: 15px;
    color: var(--text-muted);
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comparison-table td:first-child {
    text-align: left;
    color: white;
    font-weight: 500;
}

.comparison-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* ==========================================
   11. ITEM LISTS (Transactions, Events, Tasks)
   ========================================== */
.item-list,
.items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Grid layout for tasks list specifically */
#tasksList.item-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.transaction-item,
.event-item,
.task-item,
.shopping-item,
.recurring-item,
.asset-item,
.liability-item,
.item,
.feature-item {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: var(--glass-shadow);
    border: var(--glass-border);
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.transaction-item:hover,
.event-item:hover,
.task-item:hover,
.shopping-item:hover,
.recurring-item:hover,
.asset-item:hover,
.liability-item:hover,
.item:hover,
.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--glass-shadow-hover);
}

/* Feature items for admin */
.feature-item {
    background: var(--glass-bg-dark);
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.feature-info {
    flex: 1;
}

.feature-info h4 {
    color: white;
    font-size: 1rem;
    margin: 0 0 5px 0;
}

.feature-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

.feature-actions {
    display: flex;
    gap: 10px;
}

/* Item variants */
.item.user-member {
    border-left: 4px solid var(--success);
}

.item.non-user-member {
    border-left: 4px solid var(--warning);
}

.item-info {
    flex: 1;
}

.item-info strong {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-right: 10px;
}

.item-info small {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.item-actions {
    display: flex;
    gap: 10px;
}

/* Task Cards (for tasks.js module) */
.task-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 0;
    box-shadow: var(--glass-shadow);
    border: var(--glass-border);
    border-left: 4px solid var(--primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    min-height: 180px;
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glass-shadow-hover);
}

.task-card.completed {
    opacity: 0.6;
    border-left-color: var(--success);
}

.task-card.priority-low {
    border-left-color: var(--info);
}

.task-card.priority-medium {
    border-left-color: var(--warning);
}

.task-card.priority-high {
    border-left-color: var(--danger);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 10px;
}

.task-header h4 {
    color: var(--text-main);
    font-size: 1.05rem;
    margin: 0;
    font-weight: 600;
    flex: 1;
    line-height: 1.4;
}

.task-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
    color: var(--text-muted);
    font-size: 0.85rem;
    flex: 1;
}

.task-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================
   12. INFO GRID (Household)
   ========================================== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.info-item {
    padding: 15px;
    background: var(--glass-bg-dark);
    border-radius: 12px;
    border: var(--glass-border);
    transition: transform 0.2s ease;
}

.info-item:hover {
    transform: translateY(-2px);
}

.info-item label {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.info-item strong {
    color: var(--text-main);
    font-size: 16px;
}

.invite-code {
    font-family: 'Courier New', monospace;
    background: var(--primary-light);
    padding: 8px 12px;
    border-radius: 8px;
    display: inline-block;
    margin-right: 10px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 2px;
    border: 2px dashed var(--primary);
}

.info-note {
    margin-top: 15px;
    padding: 12px;
    background: var(--accent-light);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
}

.info-note small {
    color: var(--text-light);
}

/* ==========================================
   13. FORMS
   ========================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    color: var(--text-main);
    margin-bottom: 8px;
    display: block;
    font-size: 13px;
    font-weight: 600;
}

.form-control,
.form-group-input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--glass-bg-dark);
    color: white;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    font-size: 14px;
}

.form-control:focus,
.form-group-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

select.form-control {
    cursor: pointer;
}

/* Grid layout for forms */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

/* ==========================================
   14. MODALS
   ========================================== */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex !important;
}

.modal-content {
    background: white;
    color: var(--text-dark);
    border-radius: 24px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    color: var(--text-dark);
    margin-bottom: 25px;
}

.modal-content label {
    color: var(--text-dark);
}

.modal-content .form-control {
    background: #f1f5f9;
    color: var(--text-dark);
    border: 1px solid #cbd5e1;
}

.close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 32px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--danger);
}

/* ==========================================
   15. BADGES & STATUS
   ========================================== */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge.status-member,
.badge.status-planned {
    background: var(--warning-light);
    color: var(--warning);
    border-color: rgba(251, 191, 36, 0.3);
}

.badge.status-webmaster,
.badge.status-owner {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

.badge.status-progress,
.badge.status-in-progress {
    background: var(--accent-light);
    color: var(--accent);
    border-color: rgba(6, 182, 212, 0.3);
}

.badge.status-completed {
    background: var(--success-light);
    color: var(--success);
    border-color: rgba(34, 197, 94, 0.3);
}

.badge.status-danger {
    background: var(--danger-light);
    color: var(--danger);
    border-color: rgba(244, 63, 94, 0.3);
}

.badge.status-pending {
    background: var(--warning-light);
    color: var(--warning);
}

/* Status badges for specific contexts */
.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.planned {
    background: var(--warning-light);
    color: var(--warning);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-badge.in-progress {
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.status-badge.completed {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Popular badge for pricing */
.popular-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

/* ==========================================
   16. HERO SECTIONS (Public Pages)
   ========================================== */
.hero-section {
    text-align: center;
    padding: 100px 20px 60px;
    position: relative;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    background: linear-gradient(to bottom right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-section p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

/* ==========================================
   17. FEATURE GRIDS (Public Pages)
   ========================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================
   18. PRICING CARDS
   ========================================== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 80px;
}

.price-card {
    background: var(--glass-bg);
    border: var(--glass-border);
    padding: 40px;
    border-radius: 30px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.price-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.price-card.featured {
    background: var(--bg-card);
    border: 2px solid var(--primary);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.15);
    transform: scale(1.05);
    z-index: 10;
}

.price-card.featured:hover {
    transform: scale(1.05) translateY(-10px);
}

.price-amount {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin: 20px 0;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.price-period {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 30px 0;
    flex-grow: 1;
}

.feature-list li {
    padding: 12px 0;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.feature-list li i {
    color: var(--success);
}

.feature-list li.disabled {
    opacity: 0.5;
    text-decoration: line-through;
}

.feature-list li.disabled i {
    color: var(--danger);
}

/* ==========================================
   19. ROADMAP
   ========================================== */
.roadmap-item {
    display: flex;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.roadmap-item:hover {
    background: var(--glass-bg-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.roadmap-status {
    width: 8px;
    flex-shrink: 0;
}

.status-planned {
    background: linear-gradient(180deg, #6b7280, #4b5563);
}

.status-in-progress,
.status-progress {
    background: linear-gradient(180deg, var(--accent), #8b5cf6);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.status-completed {
    background: linear-gradient(180deg, var(--success), #059669);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.roadmap-details {
    padding: 28px;
    flex: 1;
}

.roadmap-details h3 {
    margin: 0 0 12px 0;
    color: #ffffff;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.roadmap-details p {
    color: var(--text-light);
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
}

/* ==========================================
   20. FAQ
   ========================================== */
.faq-grid {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: 20px;
}

.faq-item {
    background: var(--glass-bg);
    border: var(--glass-border);
    padding: 25px;
    border-radius: 20px;
}

.faq-item h3 {
    margin: 0 0 10px 0;
    color: white;
    font-size: 1.1rem;
}

.faq-item p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ==========================================
   21. ADMIN PANEL
   ========================================== */
.admin-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar */
.sidebar,
.admin-sidebar {
    width: 280px;
    min-width: 280px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px 20px;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
}

.sidebar .logo,
.admin-sidebar .logo {
    margin-bottom: 50px;
    font-size: 1.4rem;
    color: white;
    font-weight: 700;
    padding: 0 10px;
}

.sidebar nav,
.admin-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transform: translateX(5px);
}

.sidebar-link.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

/* Admin Content Area */
.admin-content {
    flex: 1;
    margin-left: 280px;
    padding: 40px 50px;
    min-height: 100vh;
    background: transparent;
}

.admin-content h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 30px;
    font-weight: 600;
}

/* Admin action buttons */
#admin-users-list .btn-icon-nav,
#admin-coupons-list .btn-delete-mini {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-muted) !important;
}

#admin-users-list .fa-trash,
#admin-coupons-list .btn-delete-mini {
    color: var(--danger) !important;
}

#admin-users-list .fa-lock-open,
#admin-users-list .fa-lock {
    color: var(--primary) !important;
}

#admin-users-list button:hover,
#admin-coupons-list button:hover {
    background: var(--danger-light) !important;
    transform: scale(1.1);
}

#admin-users-list button:hover .fa-trash,
#admin-users-list button:hover .fa-lock,
#admin-coupons-list button:hover .btn-delete-mini {
    color: white !important;
}

/* ==========================================
   22. DASHBOARD SPECIFIC
   ========================================== */
.main-dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

.module-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Page Header (for household) */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.page-header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.page-header .subtitle {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.95;
}

/* ==========================================
   23. LOADING & ERROR STATES
   ========================================== */
.loading {
    color: var(--primary);
    padding: 40px;
    text-align: center;
    font-size: 1.1rem;
}

.loading::before {
    content: "⏳ ";
    animation: spin 2s linear infinite;
}

.hidden {
    display: none !important;
}

@keyframes spin {
    0% { content: "⏳ "; }
    25% { content: "⌛ "; }
    50% { content: "⏳ "; }
    75% { content: "⌛ "; }
    100% { content: "⏳ "; }
}

.error {
    text-align: center;
    padding: 40px;
    color: var(--danger);
    background: var(--danger-light);
    border: 1px solid var(--danger);
    border-radius: 16px;
    font-size: 1.1rem;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-style: italic;
}

/* ==========================================
   24. RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 1024px) {
    .sidebar,
    .admin-sidebar {
        width: 240px;
        min-width: 240px;
    }

    .admin-content {
        margin-left: 240px;
        padding: 30px 25px;
    }
}

@media (max-width: 900px) {
    .main-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 80px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .navbar,
    .public-navbar {
        width: 95%;
        padding: 10px 20px;
    }

    .nav-links,
    .public-nav-links {
        display: none;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .stats-grid,
    .summary-cards,
    .info-grid,
    .features-grid,
    .pricing-grid,
    #tasksList.item-list {
        grid-template-columns: 1fr;
    }

    .tabs,
    .version-tabs {
        flex-direction: column;
    }

    .modal-content {
        padding: 30px 20px;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 10px;
    }

    /* Admin responsive */
    .sidebar,
    .admin-sidebar {
        width: 100%;
        min-width: 100%;
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .admin-content {
        margin-left: 0;
        padding: 20px 15px;
    }

    .admin-container {
        flex-direction: column;
    }

    .price-card.featured {
        transform: scale(1);
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .page-header .subtitle {
        font-size: 1rem;
    }

    .item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .item-actions {
        width: 100%;
        flex-direction: column;
    }

    .item-actions .btn {
        width: 100%;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .invite-code {
        font-size: 1rem;
        letter-spacing: 1px;
    }
}

/* ==========================================
   25. ANIMATIONS
   ========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.5s ease-out;
}

.item,
.feature-item {
    animation: fadeInUp 0.3s ease-out;
}

/* ==========================================
   26. UTILITY CLASSES
   ========================================== */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }

.flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.gap-1 { gap: 10px; }
.gap-2 { gap: 20px; }
.gap-3 { gap: 30px; }

.justify-center {
    justify-content: center;
}

.items-center {
    align-items: center;
}

.w-full {
    width: 100%;
}

/* ==========================================
   27. CALENDAR STYLES
   ========================================== */

/* Calendar Controls */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 20px;
    flex-wrap: wrap;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.view-btn {
    padding: 8px 20px;
    border-radius: 25px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
}

.view-btn:hover {
    color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.view-btn.active {
    background: var(--primary);
    color: white;
}

/* Calendar Grid */
.calendar-grid {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--glass-shadow);
    border: var(--glass-border);
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.calendar-day-name {
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

/* Calendar Cells */
.calendar-cell {
    aspect-ratio: 1;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 12px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.calendar-cell:hover {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}

.calendar-cell.empty {
    background: transparent;
    border: none;
    cursor: default;
}

.calendar-cell.empty:hover {
    background: transparent;
    transform: none;
}

.calendar-cell.today {
    background: var(--primary-light);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary) inset;
}

.calendar-day-number {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
    margin-bottom: 8px;
}

.calendar-cell.today .calendar-day-number {
    color: var(--primary);
    font-weight: 700;
}

/* Calendar Events */
.calendar-day-events {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calendar-event {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.calendar-event:hover {
    background: rgba(139, 92, 246, 0.3);
    transform: translateX(2px);
}

.calendar-event.local {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.3);
}

.calendar-event.google {
    background: rgba(6, 182, 212, 0.2);
    border-color: rgba(6, 182, 212, 0.3);
}

.calendar-event.google:hover {
    background: rgba(6, 182, 212, 0.3);
}

.event-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

.calendar-event.google .event-dot {
    background: var(--accent);
}

.event-title {
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    font-weight: 500;
}

.event-more {
    font-size: 10px;
    color: var(--text-muted);
    padding: 2px 6px;
    text-align: center;
    font-style: italic;
    margin-top: 2px;
}

/* Event Details Modal Content */
.event-details-content {
    margin: 20px 0;
}

.detail-row {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row strong {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-size: 14px;
}

.detail-row strong i {
    margin-right: 8px;
    color: var(--primary);
}

.detail-row span,
.detail-row p {
    color: #333;
    font-size: 14px;
}

.detail-row p {
    line-height: 1.6;
}

/* Coming Soon Message */
.coming-soon {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 18px;
    background: var(--glass-bg);
    border-radius: 20px;
    border: var(--glass-border);
}

/* Event Legend */
.event-legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    color: var(--text-main);
    font-size: 13px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* Calendar Responsive */
@media (max-width: 1024px) {
    .calendar-cell {
        padding: 8px;
    }

    .calendar-day-number {
        font-size: 12px;
    }

    .calendar-event {
        font-size: 10px;
        padding: 3px 5px;
    }

    .event-dot {
        width: 5px;
        height: 5px;
    }
}

@media (max-width: 768px) {
    .calendar-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-nav,
    .calendar-actions {
        width: 100%;
        justify-content: center;
    }

    .calendar-grid {
        padding: 10px;
    }

    .calendar-header,
    .calendar-days {
        gap: 5px;
    }

    .calendar-cell {
        padding: 6px;
        border-radius: 8px;
    }

    .calendar-day-number {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .calendar-event {
        font-size: 9px;
        padding: 2px 4px;
        gap: 4px;
    }

    .event-title {
        display: none;
    }

    .event-dot {
        width: 8px;
        height: 8px;
    }

    .view-toggle {
        justify-content: center;
    }
}
