@font-face {
    font-family: 'LapsusPro';
    src: url('./assets/fonts/LapsusPro-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap; /* Improves loading performance */
}


/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: linear-gradient(135deg, #57C3D0 0%, #74B9FF 100%);
    min-height: 100vh;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

.children-grid {
    touch-action: pan-y;
}

/* Container Layouts */
.admin-container,
.login-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(200, 238, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    z-index: 10;
}

/* Admin container when logged in */
.admin-container {
    margin-top: 40px; /* Reduced margin when navbar is hidden */
    z-index: 10;
}

/* Login container when navbar is visible */
.login-container {
    max-width: 400px;
    margin: 110px auto; /* Space for navbar */
    padding: 40px;
    text-align: center;
    z-index: 10; 
}

/* Admin Actions - Bottom Section */
.admin-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.5rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-actions button {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reset-button {
    background: #3498db;
    color: white;
    padding: 6px 8px !important;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s 
ease;
    width: 100%;
}


.reset-button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.logout-button {
    background: #e74c3c;
    color: white;
    padding: 6px 8px !important;
    margin-top: 8px !important;
}

.logout-button:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Desktop layout */
@media (min-width: 768px) {
    .admin-actions {
        flex-direction: row !important;
        display: flex !important;
    }
    
    .admin-actions button {
        width: auto !important;
        flex: none !important;
    }
    
    .admin-actions .logout-button {
        margin-left: auto !important;
    }
}

/* Headers and Titles */
.admin-header {
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.admin-title,
.login-title {
    font-family: 'LapsusPro',Verdana, Geneva, Tahoma, sans-serif;
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.admin-subtitle {
    color: #7f8c8d;
    font-size: 1rem;
}
/* Admin Dashboard Header */
.admin-logo {
    position: absolute;
    left: 0rem;                /* pin logo to far left */
    top: 29%;
    transform: translateY(-50%);
    width: 100px;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 0;
}
.admin-header {
    text-align: center;
    padding: 1rem 1rem;
    position: relative;
}

.admin-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}
.admin-title {
    font-size: 3rem;
    font-weight: 600;
    color: rgba(8, 24, 34, 0.75);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin: 0;
    z-index: 1;
}

/* SPECIFIC FIX for your subscription-modal */

/* Modal overlay - needs to be on top of everything */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.6) !important;
    z-index: 999999 !important; /* Very high z-index */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* The modal itself */
.subscription-modal {
    position: relative !important; /* Don't use fixed here since overlay handles positioning */
    z-index: 1000000 !important; /* Even higher than overlay */
    background: white !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    max-width: 500px !important;
    width: 90% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    padding: 20px !important;
}

/* Override any conflicting styles */
.modal-overlay * {
    box-sizing: border-box;
}

/* Hide modal when not active */
.modal-overlay.hidden,
.modal-overlay[style*="display: none"] {
    display: none !important;
}

/* Show modal when active */
.modal-overlay.show,
.modal-overlay.active {
    display: flex !important;
}

/* Prevent body scroll */
body.modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
}

/* Close button styling */
.subscription-modal .close,
.subscription-modal .close-btn,
.subscription-modal button[onclick*="close"] {
    position: absolute !important;
    top: 10px !important;
    right: 15px !important;
    background: none !important;
    border: none !important;
    font-size: 24px !important;
    cursor: pointer !important;
    color: #666 !important;
    z-index: 1000001 !important;
    padding: 5px !important;
}


.subscription-modal {
    border: 3px solid blue !important; /* This will help you see the modal */
}

.subscription-modal .modal-content p {color: #fdfdfd !important;
}
    
/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
    font-family: 'Schoolbell',Arial, sans-serif;
}

.section-header h2 {
    color: #2c3e50;
    margin: 0;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    flex: 1;
    min-width: 200px;
}

.admin-card h2 {
    font-size: 17px;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}
/* Auth Loading Screen */
.auth-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #57C3D0 0%, #74B9FF 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    color: white;
}

.auth-loading-screen h2 {
    margin-top: 20px;
    font-size: 1.5rem;
}

.auth-loading-screen .loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* Cards and Sections */
.family-info-section,
.customization-section,
.child-management-section,
.theme-selector-section {
    margin: 20px 0 30px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    width: 100%;
    overflow: visible;
}
.custom-field, milestone-fields {
    background: #dff3f3 ;
}


/* Force visibility for toggle content */
.customization-content[style*="display: block"],
.child-mgmt-content[style*="display: block"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    position: static !important;
    max-height: none !important;
}

/* Ensure parent containers don't clip content */
.customization-section,
.child-management-section {
    overflow: visible !important;
    height: auto !important;
}
.family-info-section {
    border-left: 5px solid #3498db;
}

.customization-section,
.theme-selector-section {
    border-left: 5px solid #9b59b6;
}

.child-management-section {
    border-left: 5px solid #e74c3c;
}

.family-info-content {
    display: grid;
    gap: 15px;
    width: 100%;
}

/* Family Code and Links */
.family-code-display,
.family-links {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    width: 100%;
}

.family-code-display label,
.family-links strong {
    display: block;
    margin-bottom: 9px;
    font-size: 1rem;
    font-weight: bold;
    color: #1f2937;

}

.code-container,
.link-container {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
}

.family-code,
#familyDashboardUrl {
    flex: 1;
    min-width: 0;
    padding: 8px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
}

.family-code {
    font-family: monospace;
    font-size: 1.3rem;
    font-weight: bold;
    color: #3498db;
    background: white;
}

#familyDashboardUrl {
    background: white;
    cursor: pointer;
}

/* Buttons */
.copy-btn {
    background: linear-gradient(135deg, #28a745, #20893a);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.copy-btn:hover {
    background: linear-gradient(135deg, #20893a, #1e7e34);
}
.profile-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 17px !important;
    font-family: Verdana, Geneva, Tahoma, sans-serif ;
}

.profile-btn {
    background-color: #3498db;
    color: white;
    border: solid #166da7;
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
}



.toggle-btn {
    background: #9595c2;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 9px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: linear-gradient(135deg, #8e44ad, #7d3c98);
}

/* Tooltip styling */
.tooltip-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    cursor: help;
    transition: all 0.3s ease;
    flex-shrink: 0; /* Prevents icon from shrinking */
}

.tooltip-icon:hover {
    background: #2980b9;
    transform: scale(1.1);
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: calc(100% + 10px); /* Position below the icon instead of above */
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    text-align: left;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    width: 280px;
    max-width: calc(100vw - 40px); /* Prevents overflow on small screens */
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    font-weight: normal;
}

/* Tooltip arrow pointing UP (since tooltip is now below) */
.tooltip-text::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom-color: #2c3e50;
}

.tooltip-icon:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Styled select dropdowns - RESTORED */
.custom-field select {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23666%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3e%3cpolyline points=%276 9 12 15 18 9%27%3e%3c/polyline%3e%3c/svg%3e');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
}

.custom-field select:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.custom-field select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.child-stats{
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 1rem; 
}
/* Mobile adjustments */
@media (max-width: 768px) {
    .tooltip-text {
        width: 240px;
        font-size: 0.8rem;
        padding: 10px 12px;
        /* Keep centered on mobile */
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    .tooltip-text::after {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    .custom-field select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Extra small screens - adjust tooltip if still overflowing */
@media (max-width: 480px) {
    .tooltip-text {
        width: 200px;
        font-size: 0.75rem;
    }
}

/* Child Sections */
.child-section,
.dynamic-child-section {
    margin-bottom: 10px;
    margin-top: 5px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border-left: 5px solid #3498db;
}

.child-section.child1,
.dynamic-child-section.theme-red { 
    border-left-color: #e74c3c; 
}

.child-section.child2,
.dynamic-child-section.theme-blue { 
    border-left-color: #3498db; 
}

.child-section.child3,
.dynamic-child-section.theme-green { 
    border-left-color: #2ecc71; 
}

.dynamic-child-section.theme-purple { 
    border-left-color: #9b59b6; 
}

.dynamic-child-section.theme-orange { 
    border-left-color: #f39c12; 
}

.dynamic-child-section.theme-pink { 
    border-left-color: #e91e63; 
}

.child-header,
.dynamic-child-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.child-name,
.dynamic-child-name {
    font-size: 1.7rem;
    color: #2c3e50;
    font-family: 'LapsusPro',Verdana, Geneva, Tahoma, sans-serif;
    
}

.child-status,
.dynamic-child-status {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.current-points,
.current-money,
.dynamic-current-points,
.dynamic-current-money {
    font-size: 0.7rem;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    color: #7f8c8d;
    background: #fff;
    padding: 2px 6px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.current-money,
.dynamic-current-money {
    border: visible #f39c12 !important;
    background: none !important;
    color: white;
    font-weight: bold;
}

/* Controls */
.controls-container,
.dynamic-controls-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.control-section,
.dynamic-control-section {
    background: rgba(255, 255, 255, 0.5);
    padding: 15px;
    border-radius: 12px;
    border: 2px solid transparent;
}

.control-section.points-section,
.dynamic-control-section.points-section {
    border-color: #3498db;
}

.control-section.money-section,
.dynamic-control-section.money-section {
    border-color: #f39c12;
}

.section-title,
.dynamic-section-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

.points-section .section-title,
.points-section .dynamic-section-title {
    color: #3498db;
}

.money-section .section-title,
.money-section .dynamic-section-title {
    color: #f39c12;
}

.button-container,
.dynamic-button-container {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.point-button,
.dynamic-point-button {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.point-button:active,
.dynamic-point-button:active {
    transform: scale(0.95);
}

/* Button Color Variations */
.add-button {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.add-button:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.3);
}

.subtract-button {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.subtract-button:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.3);
}

.add-money-button {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.add-money-button:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.3);
}

.subtract-money-button {
    background: linear-gradient(135deg, #8e44ad, #7d3c98);
    color: white;
}

.subtract-money-button:hover {
    background: linear-gradient(135deg, #7d3c98, #6c3483);
    box-shadow: 0 6px 20px rgba(142, 68, 173, 0.3);
}

.reset-money-button,
.dynamic-reset-money-button {
    background:  #000000;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    width: 100%;
}

.reset-money-button:hover,
.dynamic-reset-money-button:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
}

/* Auto Points Section */
.auto-points-section .div {
    margin-top: 20px;
    padding: 15px;
    background: #f0f8ff;
    border-radius: 10px;
    border-left: 4px solid #4f46e5;
    width: 100%;
    font-family: sans-serif !important;
}

.auto-points-toggle {
    margin-bottom: 15px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 5px;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 12px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

input[type="checkbox"]:checked + .toggle-slider {
    background: #4f46e5;
}

input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-description {
    font-size: 0.9rem;
    color: #64748b;
    margin-left: 30px;
    font-family: Arial, Helvetica, sans-serif;
}

.auto-points-settings {
    width: 100%;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.auto-points-settings h4 {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: #1e293b;
}

.time-slots {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.time-slot {
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-slot label {
    min-width: 80px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #4f46e5;
}

.time-slot input[type="time"] {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.points-amount {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.points-amount label {
    font-weight: 500;
    font-size: 0.9rem;
    min-width: 180px;
}

.points-amount input[type="number"] {
    width: 80px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

/* Forms */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
    font-weight: bold;
}

.form-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

.login-button {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-button:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.login-button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

/* Error and Feedback */
.error-message {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
}

.feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #27ae60;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    font-weight: bold;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
}

.feedback.show {
    transform: translateX(0);
}

.feedback.error {
    background: #e74c3c;
}

/* Last Updated Timestamps */
.last-updated,
.dynamic-last-updated {
    font-size: 0.86rem;
    color: #7f8c8d;
    font-style: italic;
    text-align: right;
    min-width: 120px;
}

.last-updated.recent,
.dynamic-last-updated.recent {
    color: #27ae60;
    font-weight: bold;
}

.last-updated.very-recent,
.dynamic-last-updated.very-recent {
    color: #e74c3c;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 3rem 0 1rem;
    width: 100%;
    margin: 0;
}

.footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #667eea;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 2rem;
    text-align: center;
    color: #ccc;
}

/* Empty States */
.no-children {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    background: #f8f9fa;
    border-radius: 15px;
    margin: 20px 0;
}
.dashboard-link {
    background: #4A90E2;
    color: white;
    border: none;
    padding: 10px 7px;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}


/* Mobile Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }

    .admin-container,
    .login-container {
        margin: 13px auto;
        padding: 8px;
        margin-top: 1px;
    }

    .admin-title,
    .login-title {
        font-size: 1.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .section-header h2 {
        text-align: center;
        min-width: auto;
    }

    .profile-btn {
        width: 100%;
        padding: 12px;
        text-align: center;
    }

    .code-container,
    .link-container {
        flex-direction: column;
        gap: 10px;
    }

    .copy-btn {
        width: 100%;
        padding: 12px;
    }

    .controls-container,
    .dynamic-controls-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .button-container,
    .dynamic-button-container {
        flex-direction: column;
        gap: 10px;
    }

    .point-button,
    .dynamic-point-button {
        padding: 15px;
        font-size: 1rem;
    }

    .child-status,
    .dynamic-child-status {
        flex-direction: column;
        gap: 8px;
        align-items: flex-end;
    }

    .time-slot {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }

    .time-slot label {
        min-width: auto;
        margin-bottom: 3px;
    }

    .points-amount {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .points-amount label {
        min-width: auto;
    }

    .points-amount input[type="number"] {
        width: 100%;
        max-width: 120px;
    }

    .toggle-description {
        margin-left: 0;
        margin-top: 5px;
    }

    .auto-points-toggle {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .time-slots {
        grid-template-columns: 1fr;
    }

    /* Mobile Customization Section */
    .custom-field {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px;
    }

    .custom-field label {
        padding-top: 0;
        font-size: 1.1rem;
    }

    .custom-field.behaviors-field {
        grid-template-columns: 1fr;
    }

    .custom-field button {
        padding: 12px 16px;
        font-size: 1rem;
    }

    /* Mobile Child Management */
    .add-child-form {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .remove-child-form {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .add-child-form button,
    .remove-child-form button {
        padding: 12px 20px;
        font-size: 1rem;
        justify-content: center;
    }

    .child-stats {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .theme-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .theme-option {
        height: 80px;
        font-size: 0.9rem;
    }
}

.custom-field.milestone-fields {
    background: #f5f5f5 !important;
}
/* Hide navbar and footer when admin dashboard is visible */
body.admin-logged-in #navbar-container,
body.admin-logged-in #footer-container {
    display: none !important;
}

/* Extra Small Screens */
@media (max-width: 480px) {
    .family-info-section,
    .customization-section,
    .child-management-section {
        margin: 10px 0;
        padding: 15px;
    }

    .family-code,
    #familyDashboardUrl {
        font-size: 15px;
        padding: 8px 10px;
    }
    .customization-section button:not(.toggle-btn) {
    background: linear-gradient(135deg, #3498db, #2980b9) ;
    color: white !important;
    border: none !important;
    padding: 8px 15px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
}

.customization-section button:not(.toggle-btn):hover {
    background: linear-gradient(135deg, #2980b9, #1f618d) !important;
}

    .copy-btn {
        font-size: 11px;
        padding: 8px 12px;
    }

    .auto-points-settings {
        padding: 12px;
    }

    .time-slot input[type="time"],
    .points-amount input[type="number"] {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}
.dynamic-current-points {
    text-align: center;
    background: none !important;
    border: 1.7px solid #f39c12;
    color: #f39c12 !important;
    padding: 7px 9px;
    border-radius: 20px;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}
.child-customization h3 {
    margin-top: 15px;
}

.child-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.child-info {
    flex: 1;
}

.child-actions {
    flex-shrink: 0;
    margin-left: 15px;
}

.remove-child-btn:hover {
    background: #c82333 !important;
}

.remove-child-warning {
    margin: 20px 0;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
}

.add-child-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}