/* ============================================
   DAYCARE SYSTEM - CssStyles.css
   My Rainbow Family Child Care
   THEME: Pastel Rainbow - Fun & Professional
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700;800&family=Quicksand:wght@400;500;600;700&display=swap');

:root {
    /* --- Pastel Rainbow Palette --- */
    --primary: #7C6FE0;                /* Soft lavender purple */
    --primary-light: #A89BF0;          /* Light lavender */
    --primary-dark: #5B4FC7;           /* Deeper lavender */
    --primary-bg: #F0EDFF;             /* Very light lavender bg */

    --secondary: #5BB8F5;              /* Soft sky blue */
    --secondary-light: #8DD0FF;        /* Light sky */

    --accent: #FFB347;                 /* Soft peach orange */
    --accent-light: #FFD699;           /* Light peach */

    --success: #5CC9A7;                /* Mint green */
    --success-bg: #E0F8F0;            /* Light mint bg */

    --danger: #F47B8A;                 /* Soft coral pink */
    --danger-bg: #FDE8EB;             /* Light coral bg */

    --warning: #FFCF5C;               /* Soft sunny yellow */
    --warning-bg: #FFF8E1;            /* Light sunny bg */

    --info: #5BB8F5;                   /* Soft blue */
    --info-bg: #E3F2FD;               /* Light blue bg */

    /* --- Backgrounds --- */
    --bg-main: #FBF7FF;               /* Very soft lilac white */
    --bg-card: #FFFFFF;                /* Pure white cards */
    --bg-sidebar: #6C5CE7;            /* Fun purple sidebar */
    --bg-sidebar-hover: #7F71ED;       /* Lighter purple hover */
    --bg-sidebar-active: #FFB347;      /* Peach orange active */

    /* --- Text --- */
    --text-primary: #000000;           /* Black text */
    --text-secondary: #1A1A1A;         /* Dark black for labels */
    --text-muted: #333333;             /* Dark grey-black for hints */
    --text-white: #FFFFFF;             /* White text */
    --text-sidebar: #E0D6FF;           /* Light sidebar text */

    /* --- Borders --- */
    --border: #E8DEF8;                 /* Soft lavender border */
    --border-light: #F3EEFF;           /* Very light border */

    /* --- Shadows (soft pastel) --- */
    --shadow-sm: 0 1px 3px rgba(108,92,231,0.06);
    --shadow: 0 2px 8px rgba(108,92,231,0.08), 0 1px 3px rgba(108,92,231,0.06);
    --shadow-md: 0 4px 12px rgba(108,92,231,0.1), 0 2px 4px rgba(108,92,231,0.06);
    --shadow-lg: 0 8px 24px rgba(108,92,231,0.12), 0 4px 8px rgba(108,92,231,0.06);

    /* --- Radius --- */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 26px;

    /* --- Layout --- */
    --sidebar-width: 260px;
    --topbar-height: 64px;

    /* --- Fonts --- */
    --font-body: 'Nunito', sans-serif;
    --font-heading: 'Quicksand', sans-serif;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg-main); color: var(--text-primary); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: var(--primary); transition: color 0.2s; }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4, h5 { font-family: var(--font-heading); font-weight: 700; line-height: 1.3; color: var(--text-primary); }

/* ===== LAYOUT ===== */
.app-layout { display: flex; min-height: 100vh; }

/* ===== SIDEBAR - Pastel Purple ===== */
.sidebar { width: var(--sidebar-width); background: linear-gradient(180deg, #6C5CE7 0%, #7F71ED 40%, #A89BF0 100%); position: fixed; top: 0; left: 0; height: 100vh; z-index: 100; display: flex; flex-direction: column; transition: transform 0.3s cubic-bezier(.4,0,.2,1); overflow-y: auto; }
.sidebar-header { padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,0.15); }
.sidebar-logo { display: flex; align-items: center; gap: 12px; }
.sidebar-logo .logo-icon { width: 44px; height: 44px; background: linear-gradient(135deg, #FFB347, #FF6B8A); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; box-shadow: 0 4px 12px rgba(255,107,138,0.3); }
.sidebar-logo .logo-text { color: var(--text-white); font-family: var(--font-heading); font-weight: 700; font-size: 1.08rem; line-height: 1.3; }
.sidebar-logo .logo-text small { display: block; font-size: 0.7rem; font-weight: 500; color: rgba(255,255,255,0.7); letter-spacing: 0.5px; }
.sidebar-nav { flex: 1; padding: 16px 12px; }
.nav-section-title { font-size: 0.82rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: #FFFFFF; padding: 12px 12px 8px; margin-top: 8px; border-top: 2px solid rgba(255,255,255,0.6); }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--radius-sm); color: #FFFFFF; font-size: 0.9rem; font-weight: 600; transition: all 0.2s; margin-bottom: 2px; cursor: pointer; }
.nav-item:hover { background: #00008B; color: #fff; }
.nav-item.active { background: var(--bg-sidebar-active); color: #4A4063; font-weight: 700; box-shadow: 0 3px 10px rgba(255,179,71,0.3); }
.nav-item .nav-icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.sidebar-footer { padding: 16px 12px; border-top: 1px solid rgba(255,255,255,0.15); }

/* ===== MAIN CONTENT ===== */
.main-content { flex: 1; margin-left: var(--sidebar-width); min-height: 100vh; }
.topbar { height: var(--topbar-height); background: var(--bg-card); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow-sm); }
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-left h2 { font-size: 1.2rem; font-weight: 700; color: var(--primary); }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.btn-menu-toggle { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--text-secondary); padding: 4px; }
.content-area { padding: 28px; }

/* ===== CARDS - Soft & Rounded ===== */
.card { background: var(--bg-card); border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--border-light); overflow: hidden; }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; background: linear-gradient(135deg, #F8F5FF 0%, #FFF8F0 100%); }
.card-header h3 { font-size: 1.05rem; font-weight: 700; color: var(--primary); }
.card-body { padding: 24px; }
.card-footer { padding: 16px 24px; border-top: 1px solid var(--border); background: var(--bg-main); }

/* ===== STAT CARDS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin-bottom: 28px; }
.stat-card { background: var(--bg-card); border-radius: var(--radius-lg); padding: 22px 24px; box-shadow: var(--shadow); border: 1px solid var(--border-light); display: flex; align-items: flex-start; gap: 16px; transition: transform 0.2s, box-shadow 0.2s; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-icon { width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.stat-icon.blue { background: #E3F2FD; color: #5BB8F5; }
.stat-icon.green { background: #E0F8F0; color: #5CC9A7; }
.stat-icon.orange { background: #FFF3E0; color: #FFB347; }
.stat-icon.red { background: #FDE8EB; color: #F47B8A; }
.stat-icon.purple { background: #F0EDFF; color: #7C6FE0; }
.stat-info h4 { font-size: 0.78rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-info .stat-number { font-family: var(--font-heading); font-size: 1.7rem; font-weight: 800; color: var(--text-primary); line-height: 1.2; margin-top: 4px; }
.stat-info .stat-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

/* ===== BUTTONS - Rounded & Colorful ===== */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 10px; font-family: var(--font-body); font-size: 0.88rem; font-weight: 600; border: none; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.btn-primary { background: linear-gradient(135deg, #7C6FE0, #A89BF0); color: #fff; box-shadow: 0 3px 10px rgba(124,111,224,0.25); }
.btn-primary:hover { background: linear-gradient(135deg, #5B4FC7, #7C6FE0); color: #fff; transform: translateY(-1px); }
.btn-success { background: linear-gradient(135deg, #5CC9A7, #7EDCBF); color: #fff; box-shadow: 0 3px 10px rgba(92,201,167,0.25); }
.btn-success:hover { background: linear-gradient(135deg, #42B593, #5CC9A7); color: #fff; }
.btn-danger { background: linear-gradient(135deg, #F47B8A, #F9A0AB); color: #fff; box-shadow: 0 3px 10px rgba(244,123,138,0.25); }
.btn-danger:hover { background: linear-gradient(135deg, #E55A6B, #F47B8A); color: #fff; }
.btn-warning { background: linear-gradient(135deg, #FFB347, #FFD699); color: #4A4063; box-shadow: 0 3px 10px rgba(255,179,71,0.25); }
.btn-warning:hover { background: linear-gradient(135deg, #FFA020, #FFB347); }
.btn-secondary { background: #F0EDFF; color: var(--primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: #E0D6FF; color: var(--primary-dark); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; border-radius: 8px; }
.btn-lg { padding: 12px 24px; font-size: 1rem; border-radius: 12px; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; letter-spacing: 0.3px; }
.form-control { width: 100%; padding: 10px 14px; border: 2px solid var(--border); border-radius: 10px; font-family: var(--font-body); font-size: 0.9rem; color: var(--text-primary); background: #FDFBFF; transition: border-color 0.2s, box-shadow 0.2s; }
.form-control:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 4px rgba(124,111,224,0.1); background: #fff; }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237B6F99' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

/* ===== TABLES ===== */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table thead th { padding: 12px 16px; text-align: left; font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--primary); background: linear-gradient(135deg, #F8F5FF, #FFF5EE); border-bottom: 2px solid var(--border); white-space: nowrap; }
.data-table tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border-light); color: var(--text-primary); vertical-align: middle; }
.data-table tbody tr:hover { background: #F8F0FF; }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ===== BADGES - Pastel ===== */
.badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; }
.badge-active, .badge-success { background: var(--success-bg); color: #3BA583; }
.badge-inactive, .badge-danger { background: var(--danger-bg); color: #D9536C; }
.badge-id { background: #EEF2FF; color: #4338CA; font-family: 'Courier New', monospace; font-size: 0.8rem; font-weight: 700; padding: 4px 10px; border-radius: 6px; border: 1px solid #C7D2FE; letter-spacing: 0.3px; }
.badge-pending, .badge-warning { background: var(--warning-bg); color: #C49A20; }
.badge-info { background: var(--info-bg); color: #3A8FD4; }

/* ===== ALERTS / FLASH - Pastel ===== */
.alert { padding: 14px 20px; border-radius: var(--radius); margin-bottom: 20px; font-size: 0.9rem; display: flex; align-items: center; gap: 10px; animation: slideDown 0.3s ease; }
.alert-success { background: #E0F8F0; color: #2E7D5F; border-left: 4px solid #5CC9A7; }
.alert-danger { background: #FDE8EB; color: #B5394A; border-left: 4px solid #F47B8A; }
.alert-warning { background: #FFF8E1; color: #8A6D00; border-left: 4px solid #FFCF5C; }
.alert-info { background: #E3F2FD; color: #2466A8; border-left: 4px solid #5BB8F5; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ===== MODAL ===== */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(74,64,99,0.4); backdrop-filter: blur(6px); z-index: 200; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.3s; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal { background: var(--bg-card); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); width: 90%; max-width: 600px; max-height: 85vh; overflow-y: auto; transform: translateY(20px); transition: transform 0.3s; }
.modal-overlay.active .modal { transform: translateY(0); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, #F8F5FF, #FFF5EE); border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
.modal-header h3 { font-size: 1.1rem; color: var(--primary); }
.modal-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--text-muted); padding: 4px; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ===== SEARCH & FILTERS ===== */
.search-bar { position: relative; }
.search-bar input { padding-left: 40px; }
.search-bar .search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.95rem; }
.filter-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }

/* ===== PAGINATION ===== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 16px 0; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: 10px; font-size: 0.85rem; font-weight: 600; transition: all 0.2s; }
.pagination a { color: var(--text-secondary); border: 1px solid var(--border); }
.pagination a:hover { background: var(--primary-bg); border-color: var(--primary-light); color: var(--primary); }
.pagination .active { background: linear-gradient(135deg, #7C6FE0, #A89BF0); color: #fff; border: 1px solid transparent; }

/* ===== LOGIN PAGE - Pastel Rainbow ===== */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #E8DAFF 0%, #FFF0F5 30%, #E0F8FF 60%, #FFF8E1 100%); position: relative; overflow: hidden; }
.login-page::before { content: ''; position: absolute; width: 500px; height: 500px; background: radial-gradient(circle, rgba(124,111,224,0.12), transparent 70%); top: -100px; right: -100px; border-radius: 50%; }
.login-page::after { content: ''; position: absolute; width: 400px; height: 400px; background: radial-gradient(circle, rgba(255,179,71,0.1), transparent 70%); bottom: -100px; left: -100px; border-radius: 50%; }
.login-box { background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); border-radius: var(--radius-xl); padding: 40px; width: 90%; max-width: 420px; box-shadow: var(--shadow-lg); position: relative; z-index: 1; border: 1px solid rgba(124,111,224,0.1); }
.login-box .logo-area { text-align: center; margin-bottom: 32px; }
.login-box .logo-area .logo-circle { width: 68px; height: 68px; background: linear-gradient(135deg, #FFB347, #FF6B8A, #7C6FE0); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 30px; margin-bottom: 16px; box-shadow: 0 6px 20px rgba(255,107,138,0.3); }
.login-box .logo-area h1 { font-size: 1.4rem; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.login-box .logo-area p { color: var(--text-muted); font-size: 0.85rem; }

/* ===== USER AVATAR ===== */
.user-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #FFB347, #FF6B8A); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 0.9rem; box-shadow: 0 3px 8px rgba(255,107,138,0.25); }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 3.5rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h4 { font-size: 1.05rem; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 0.88rem; }
.action-btns { display: flex; gap: 6px; }

/* ===== UTILITIES ===== */
.text-center { text-align: center; } .text-right { text-align: right; }
.text-success { color: #3BA583; } .text-danger { color: #D9536C; }
.text-warning { color: #C49A20; } .text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.w-100 { width: 100%; } .fw-bold { font-weight: 700; } .nowrap { white-space: nowrap; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); } .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; } .btn-menu-toggle { display: block; }
    .content-area { padding: 16px; } .stats-grid { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; } .topbar { padding: 0 16px; }
    .card-header { flex-direction: column; align-items: flex-start; }
    .filter-bar { flex-direction: column; align-items: stretch; }
}
@media (max-width: 480px) { .stats-grid { grid-template-columns: 1fr; } }
@media print {
    .sidebar, .topbar, .btn, .action-btns, .filter-bar { display: none !important; }
    .main-content { margin-left: 0 !important; } .card { box-shadow: none; border: 1px solid #ccc; }
}
