/* assets/css/portal.css - Premium Glassmorphic Design System */

:root {
    --bg-dark: #090d16;
    --card-bg-glass: rgba(17, 25, 40, 0.75);
    --border-glass: rgba(255, 255, 255, 0.075);
    --border-glass-hover: rgba(255, 255, 255, 0.15);
    
    --primary-indigo: #6366f1;
    --primary-indigo-hover: #4f46e5;
    --primary-indigo-glow: rgba(99, 102, 241, 0.15);
    
    --primary-green: #10b981;
    --primary-green-hover: #059669;
    --primary-green-glow: rgba(16, 185, 129, 0.15);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Globals */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Ambient Orbs Background */
.bg-blur-orbs {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    transition: var(--transition-smooth);
}

.orb-green {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--primary-green) 0%, rgba(16, 185, 129, 0) 70%);
    top: -10%;
    left: -5%;
    animation: floatOrb1 15s infinite alternate ease-in-out;
}

.orb-indigo {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-indigo) 0%, rgba(99, 102, 241, 0) 70%);
    bottom: -10%;
    right: -5%;
    animation: floatOrb2 18s infinite alternate ease-in-out;
}

@keyframes floatOrb1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 30px) scale(1.1); }
}

@keyframes floatOrb2 {
    0% { transform: translate(0, 0) scale(1.1); }
    100% { transform: translate(-60px, -40px) scale(0.9); }
}

/* Navbar */
.portal-navbar {
    width: 100%;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-color: rgba(9, 13, 22, 0.7);
    border-bottom: 1px solid var(--border-glass);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.portal-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.portal-logo-group {
    display: flex;
    align-items: center;
}

.portal-logo-img {
    height: 40px;
    max-width: 150px;
    object-fit: contain;
}

.portal-logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--text-primary);
}

.portal-logo-text span {
    color: var(--primary-indigo);
    font-weight: 400;
    margin-left: 2px;
}

.portal-nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-greeting {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.user-greeting strong {
    color: var(--text-primary);
}

/* Portal Main Container */
.portal-main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.portal-header {
    text-align: center;
    margin-bottom: 4rem;
}

.portal-header h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.portal-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Grid Layout */
.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
}

/* Glassmorphic Portal Cards */
.portal-card {
    background-color: var(--card-bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 1.5rem;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-premium);
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.portal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.portal-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-glass-hover);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6);
}

.card-glow {
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    filter: blur(80px);
    top: -50px;
    left: -50px;
    opacity: 0.15;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.portal-card h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.portal-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    flex-grow: 1;
}

/* Color thematic styles for Personal vs Business */
.card-personal .card-glow {
    background-color: var(--primary-green);
}
.card-personal:hover {
    box-shadow: 0 20px 45px -10px rgba(16, 185, 129, 0.12), var(--shadow-premium);
}

.card-business .card-glow {
    background-color: var(--primary-indigo);
}
.card-business:hover {
    box-shadow: 0 20px 45px -10px rgba(99, 102, 241, 0.12), var(--shadow-premium);
}

/* Stat Badges inside cards */
.stat-badges {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.badge-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 0.75rem;
    padding: 0.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.badge-number {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.card-personal .badge-number {
    color: var(--primary-green);
}

.card-business .badge-number {
    color: var(--primary-indigo);
}

.badge-number.text-warn {
    color: #fb923c !important;
}

.badge-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
    text-align: center;
}

/* Buttons System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-smooth);
    border: none;
}

.btn-logout-outline {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.btn-logout-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-color: var(--text-secondary);
}

.btn-card {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 1rem;
}

.btn-personal {
    background-color: var(--primary-green);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-personal:hover {
    background-color: var(--primary-green-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-business {
    background-color: var(--primary-indigo);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-business:hover {
    background-color: var(--primary-indigo-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-arrow {
    font-size: 1.25rem;
    transition: var(--transition-smooth);
}

.btn-card:hover .btn-arrow {
    transform: translateX(4px);
}

/* Footer styling */
.portal-footer-text {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* --- LOGIN SCREEN SPECIFIC --- */
.login-body {
    justify-content: center;
    align-items: center;
}

.login-bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, rgba(99,102,241,0) 70%);
    filter: blur(80px);
    z-index: -1;
}

.login-wrapper {
    width: 100%;
    max-width: 440px;
    padding: 1.5rem;
}

.login-card {
    background-color: var(--card-bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 1.5rem;
    padding: 3rem 2.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-premium);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

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

.brand-logo {
    height: 60px;
    max-width: 180px;
    object-fit: contain;
}

.text-brand {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.05em;
}

.text-brand span {
    color: var(--primary-indigo);
    font-weight: 400;
    margin-left: 2px;
}

.login-card h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.login-card .subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-align: center;
    margin-bottom: 2.25rem;
    line-height: 1.5;
}

/* Forms input fields styling */
.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.label-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    font-size: 1rem;
    color: var(--text-secondary);
    pointer-events: none;
}

.login-form .form-control {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-radius: 0.75rem;
    color: white;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    transition: var(--transition-smooth);
}

.login-form .form-control:focus {
    outline: none;
    border-color: var(--primary-indigo);
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Primary Form Button */
.btn-login {
    background-color: var(--primary-indigo);
    color: white;
    width: 100%;
    padding: 1rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.btn-login:hover {
    background-color: var(--primary-indigo-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-login .btn-arrow {
    transition: var(--transition-smooth);
}

.btn-login:hover .btn-arrow {
    transform: translateX(4px);
}

/* Custom Alerts */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.alert-icon {
    font-size: 1.1rem;
}

/* Responsiveness adjustments */
@media (max-width: 640px) {
    .portal-main {
        padding: 2rem 1rem;
    }
    
    .portal-header h1 {
        font-size: 2.25rem;
    }
    
    .portal-card {
        padding: 2rem 1.5rem;
    }
    
    .login-card {
        padding: 2.5rem 1.5rem;
    }
}

/* --- UNIFIED SIDEBAR DASHBOARD SYSTEM --- */
.dashboard-body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

@media (max-width: 992px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border-glass) !important;
        padding: 1.5rem !important;
    }
}

.sidebar {
    background-color: #13132e;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-brand {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.sidebar-logo {
    max-height: 45px;
    max-width: 100%;
    object-fit: contain;
}

.sidebar-menu {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
}

.menu-section {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8f8fb8;
    margin-top: 0.65rem;
    margin-bottom: 0.2rem;
    font-weight: 700;
    padding-left: 0.5rem;
    opacity: 0.8;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.75rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: var(--transition-smooth);
}

.menu-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.menu-item.active {
    background-color: #4f46e5 !important;
    color: #ffffff !important;
    font-weight: 600;
    border-left: none !important;
    border-radius: 0.5rem;
}

.menu-item-personal.active {
    background-color: #10b981 !important;
    color: #ffffff !important;
    font-weight: 600;
    border-left: none !important;
    border-radius: 0.5rem;
}

.sidebar-footer {
    border-top: 1px solid var(--border-glass);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.8125rem;
    font-weight: 700;
    color: white;
}

.user-email {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.sidebar-logout-btn {
    width: 100%;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    padding: 0.5rem;
    border-radius: 0.5rem;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8125rem;
    transition: var(--transition-smooth);
}

.sidebar-logout-btn:hover {
    background: #ef4444;
    color: white;
}

/* Main Content Area */
.main-content {
    padding: 2.5rem 3rem;
    max-width: 1400px;
    width: 100%;
    display: flex;
    flex-direction: column;
}

@media (max-width: 640px) {
    .main-content {
        padding: 1.5rem 1rem;
    }
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.content-header h1 {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-widget {
    background: var(--card-bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 1rem;
    padding: 1.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}

.stat-widget:hover {
    transform: translateY(-2px);
    border-color: var(--border-glass-hover);
}

.stat-widget-info {
    display: flex;
    flex-direction: column;
}

.stat-widget-val {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
}

.stat-widget-lbl {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-top: 6px;
}

.stat-widget-icon {
    font-size: 2.25rem;
    opacity: 0.85;
}

/* Two columns unified grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-panel {
    background: var(--card-bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 1.25rem;
    padding: 2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-premium);
    height: fit-content;
}

.dashboard-panel h2 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Escola Bressol Style - Sidebar Badges */
.menu-item-badge {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 0.725rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    margin-left: auto;
    display: inline-block;
    line-height: 1.2;
}
.menu-item-badge.badge-urgent {
    background-color: #ef4444;
}
.menu-item.active .menu-item-badge {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Escola Bressol Style - Clean Stat Cards */
.stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: var(--transition-smooth);
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}
.stat-card-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}
.stat-card-value {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
}
.stat-card-subtext {
    font-size: 0.8125rem;
    color: #94a3b8;
}

/* Specific Card Value Colors */
.val-green { color: #10b981; }
.val-blue  { color: #0ea5e9; }
.val-orange { color: #f97316; }
.val-red   { color: #f43f5e; }

/* Escola Bressol Style - Alert Banner */
.alert-warning-banner {
    background-color: #fff7ed;
    border: 1px solid #ffedd5;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 12px;
}
.alert-warning-banner-text {
    font-size: 0.875rem;
    color: #8a3803;
    line-height: 1.4;
}
.alert-warning-banner-text strong {
    color: #c2410c;
}

/* Escola Bressol Style - Category Blocks Grid */
.category-block-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.category-block {
    border-radius: 0.75rem;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    text-decoration: none;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}
.category-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.category-block-emoji {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    line-height: 1;
}
.category-block-name {
    font-size: 0.8125rem;
    font-weight: 600;
    opacity: 0.95;
    margin-bottom: 0.25rem;
}
.category-block-count {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

/* Color blocks from the image */
.block-orange { background-color: #ea580c; }
.block-blue   { background-color: #0ea5e9; }
.block-black  { background-color: #0f172a; }
.block-grey   { background-color: #64748b; }
.block-green  { background-color: #16a34a; }

/* Escola Bressol Style - Birthday / Agenda List */
.event-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}
.event-list-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
    justify-content: space-between;
    gap: 12px;
}
.event-list-item:last-child {
    border-bottom: none;
}
.event-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.event-icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.event-details {
    display: flex;
    flex-direction: column;
}
.event-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
}
.event-subtitle {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}
.event-time-left {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #4f46e5;
    white-space: nowrap;
}
.event-time-left.overdue {
    color: #ef4444;
}

/* ============================================================
   RESPONSIVE DESIGN & MOBILE SIDEBAR TOGGLE
   ============================================================ */

/* Mobile Hamburger Button style */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #13132e;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 1001;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.sidebar-toggle:hover {
    background-color: #1c1c44;
}

.hamburger-icon {
    display: block;
    width: 18px;
    height: 14px;
    position: relative;
}

.hamburger-icon span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: #ffffff;
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

.hamburger-icon span:nth-child(1) { top: 0px; }
.hamburger-icon span:nth-child(2) { top: 6px; }
.hamburger-icon span:nth-child(3) { top: 12px; }

.sidebar-toggle.active .hamburger-icon span:nth-child(1) {
    transform: rotate(135deg);
    top: 6px;
}
.sidebar-toggle.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
    left: -60px;
}
.sidebar-toggle.active .hamburger-icon span:nth-child(3) {
    transform: rotate(-135deg);
    top: 6px;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(9, 9, 20, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-smooth);
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Media Queries for Layout adaptation */
@media (max-width: 992px) {
    .sidebar-toggle {
        display: flex;
    }
    
    .sidebar-overlay {
        display: block;
    }

    .main-container {
        grid-template-columns: 1fr !important;
        padding-top: 60px; /* Space for the top floating bar / hamburger button */
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -290px; /* Collapsed out of view */
        width: 280px;
        height: 100vh;
        z-index: 1000;
        transition: transform var(--transition-smooth);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.25);
    }

    .sidebar.active {
        transform: translateX(290px);
    }

    .content-area {
        padding: 2rem 1.5rem !important;
    }
}

@media (max-width: 640px) {
    .content-area {
        padding: 1.5rem 1rem !important;
    }
    
    .content-title-block h1 {
        font-size: 1.6rem !important;
    }
    
    /* Auto wrap columns inside forms and pages */
    .form-row, .grid-two-columns {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .card-white {
        padding: 1.25rem !important;
    }
}

/* ============================================================
   TABS & NAVIGATION (for Client profile, Diary and Budgets)
   ============================================================ */
.tabs-header {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid #f1f5f9;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none; /* Hide scrollbar for clean layout */
    -ms-overflow-style: none;
}
.tabs-header::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.tab-btn:hover {
    color: #4f46e5;
}

.tab-btn.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
}

/* Tab contents styling */
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
    animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Table Responsive layout for Mobile */
@media (max-width: 768px) {
    /* Force tables to stack vertically */
    .responsive-table, 
    .responsive-table thead, 
    .responsive-table tbody, 
    .responsive-table th, 
    .responsive-table td, 
    .responsive-table tr { 
        display: block; 
    }
    
    .responsive-table thead tr { 
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .responsive-table tr { 
        border: 1px solid #e2e8f0; 
        border-radius: 0.75rem;
        background: #ffffff;
        margin-bottom: 1rem;
        padding: 0.75rem;
        box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    }
    
    .responsive-table td { 
        border: none;
        border-bottom: 1px solid #f1f5f9; 
        position: relative;
        padding-left: 50% !important; 
        text-align: right;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
    
    .responsive-table td:last-child {
        border-bottom: 0;
    }
    
    .responsive-table td:before { 
        position: absolute;
        top: 50%;
        left: 15px;
        transform: translateY(-50%);
        width: 45%; 
        padding-right: 10px; 
        white-space: nowrap;
        text-align: left;
        font-weight: 600;
        color: #475569;
        content: attr(data-label);
    }
}

/* ============================================================
   PREMIUM SCROLLBAR FOR SIDEBAR & GLOBAL CONTAINERS
   ============================================================ */
::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
}
::-webkit-scrollbar-track {
    background: transparent !important;
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2) !important; /* Soft slate-400 thumb for light areas */
    border-radius: 99px !important;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.35) !important;
}

/* Specific styling for Dark Sidebar Scrollbars to stand out correctly */
.sidebar::-webkit-scrollbar-thumb,
.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15) !important; /* Translucent white for dark areas */
}
.sidebar::-webkit-scrollbar-thumb:hover,
.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

/* Firefox scrollbar support */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.2) transparent;
}
.sidebar,
.sidebar-menu {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* ============================================================
   GLOBAL PREMIUM FORM CONTROLS & FIELDS
   ============================================================ */
.form-group {
    margin-bottom: 1.25rem !important;
}

.form-group label {
    display: block !important;
    font-size: 0.725rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #475569 !important;
    margin-bottom: 0.5rem !important;
    letter-spacing: 0.05em !important;
}

.form-control {
    width: 100% !important;
    height: 44px !important;
    padding: 0.625rem 1rem !important;
    background-color: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 0.625rem !important;
    color: #0f172a !important;
    font-family: var(--font-body) !important;
    font-size: 0.9375rem !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

.form-control:focus {
    outline: none !important;
    border-color: #4f46e5 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12) !important;
}

/* Placeholder color styling */
.form-control::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

/* Custom styled selects with SVG arrows */
select.form-control {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    padding-right: 2.5rem !important;
}

/* Textarea controls */
textarea.form-control {
    height: auto !important;
    min-height: 110px !important;
    resize: vertical !important;
    padding: 0.75rem 1rem !important;
    line-height: 1.5 !important;
}

/* Date picker controls spacing fix */
input[type="date"].form-control {
    padding-right: 0.5rem !important;
}

/* ============================================================
   PREMIUM DIARY JOURNAL ENTRIES & TIMELINE LAYOUT
   ============================================================ */
.timeline-container {
    position: relative;
    padding-left: 2rem;
    margin-left: 0.5rem;
    border-left: 2px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.timeline-item {
    position: relative;
}

.timeline-node {
    position: absolute;
    left: -43px; /* Centers perfectly on the 2px border line */
    top: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--node-color, #cbd5e1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    z-index: 2;
    transition: all 0.25s ease;
}

.timeline-item:hover .timeline-node {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.journal-card {
    background: #ffffff !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-left: 5px solid var(--accent-color, #4f46e5) !important;
    border-radius: 1rem !important;
    padding: 1.5rem 1.75rem !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.03) !important;
    position: relative !important;
    transition: all 0.25s ease !important;
    overflow: hidden !important;
}

.journal-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.06) !important;
    border-color: rgba(203, 213, 225, 0.8) !important;
}

.journal-badge-tag {
    font-size: 0.725rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 0.25rem 0.6rem !important;
    border-radius: 0.375rem !important;
    letter-spacing: 0.02em !important;
}

.journal-title {
    font-family: var(--font-heading) !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0.75rem 0 0.5rem 0 !important;
    line-height: 1.3 !important;
}

.journal-date {
    font-size: 0.75rem !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
}

.journal-content {
    font-size: 0.9375rem !important;
    color: #334155 !important;
    line-height: 1.6 !important;
    margin-top: 0.75rem !important;
    margin-bottom: 1.25rem !important;
}



