/* Children Dashboard CSS */
/* Styles for children module dashboard - compact hours card design */

/* Dashboard Container */
.children-dashboard .summary-dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
    padding: 0 10px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    justify-items: stretch;
}

/* Single card layout - full width */
.children-dashboard .summary-dashboard:has(.hours-card-compact:only-child) {
    grid-template-columns: 1fr;
    max-width: 100%;
}

/* Limit max width for better balance when there are 2 cards */
.children-dashboard .summary-dashboard:has(.enhanced-stat-card:nth-child(2):last-child) {
    grid-template-columns: repeat(2, 1fr);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

/* Fallback for browsers that don't support :has() - use JavaScript class if needed */
.children-dashboard .summary-dashboard.dashboard-2-cards {
    grid-template-columns: repeat(2, 1fr);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

/* Enhanced Stat Card Base */
.children-dashboard .enhanced-stat-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    min-width: 0;
    flex: 1;
    max-width: 100%;
    box-sizing: border-box;
}

.children-dashboard .enhanced-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* Card Type Borders */
.children-dashboard .enhanced-card-primary {
    border-top: 4px solid #337ab7;
}

.children-dashboard .enhanced-card-success {
    border-top: 4px solid #5cb85c;
}

.children-dashboard .enhanced-card-info {
    border-top: 4px solid #5bc0de;
}

.children-dashboard .enhanced-card-warning {
    border-top: 4px solid #f0ad4e;
}

/* Card Header */
.children-dashboard .card-header {
    padding: 15px 20px 12px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.children-dashboard .card-title {
    display: flex;
    align-items: center;
    font-size: 1.1em;
    font-weight: bold;
    color: #2c3e50;
    flex: 1;
    min-width: 0;
}

.children-dashboard .card-title i {
    margin-left: 8px;
    font-size: 1em;
}

/* Progress Circle */
.children-dashboard .card-progress-circle {
    width: 50px;
    height: 50px;
    position: relative;
    flex-shrink: 0;
    margin-right: 10px;
}

.children-dashboard .simple-progress-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.children-dashboard .ring-background {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 6px solid #e9ecef;
    box-sizing: border-box;
}

.children-dashboard .ring-fill {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 6px solid transparent;
    border-top-color: #337ab7;
    box-sizing: border-box;
    transform-origin: center;
    transition: transform 0.3s ease;
}

.children-dashboard .simple-progress-ring.ring-primary .ring-fill {
    border-top-color: #337ab7;
}

.children-dashboard .simple-progress-ring.ring-info .ring-fill {
    border-top-color: #5bc0de;
}

.children-dashboard .simple-progress-ring.ring-warning .ring-fill {
    border-top-color: #f0ad4e;
}

.children-dashboard .simple-progress-ring.ring-success .ring-fill {
    border-top-color: #5cb85c;
}

.children-dashboard .simple-progress-ring.ring-danger .ring-fill {
    border-top-color: #d9534f;
}

.children-dashboard .ring-text {
    position: relative;
    z-index: 2;
    font-weight: bold;
    font-size: 0.85em;
    color: #2c3e50;
}

/* Card Body */
.children-dashboard .card-body {
    padding: 15px 20px;
}

.children-dashboard .stats-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.children-dashboard .stats-main-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Override for single stat-item cards */
.children-dashboard .enhanced-stat-card:not(.enhanced-card-info) .stats-main-row {
    grid-template-columns: 1fr;
}

/* Hours Assistance card should have 3 columns */
.children-dashboard .enhanced-card-info .stats-main-row {
    grid-template-columns: repeat(3, 1fr);
}

/* Stat Item */
.children-dashboard .stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
    border-right: 4px solid transparent;
}

.children-dashboard .stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.children-dashboard .stat-item.stat-primary {
    border-right-color: #337ab7;
}

.children-dashboard .stat-item.stat-success {
    border-right-color: #5cb85c;
}

.children-dashboard .stat-item.stat-warning {
    border-right-color: #f0ad4e;
}

.children-dashboard .stat-item.stat-info {
    border-right-color: #5bc0de;
}

/* Stat Icon */
.children-dashboard .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    flex-shrink: 0;
}

.children-dashboard .stat-primary .stat-icon {
    background: linear-gradient(135deg, #337ab7, #5a9bd4);
    color: white;
}

.children-dashboard .stat-success .stat-icon {
    background: linear-gradient(135deg, #5cb85c, #7bc97b);
    color: white;
}

.children-dashboard .stat-warning .stat-icon {
    background: linear-gradient(135deg, #f0ad4e, #f7c371);
    color: white;
}

.children-dashboard .stat-info .stat-icon {
    background: linear-gradient(135deg, #5bc0de, #7dd3f0);
    color: white;
}

/* Stat Content */
.children-dashboard .stat-content {
    flex: 1;
    min-width: 0;
}

.children-dashboard .stat-value {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 3px;
    line-height: 1.1;
}

.children-dashboard .stat-label {
    font-size: 0.9em;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 2px;
}

.children-dashboard .stat-subtitle {
    font-size: 0.75em;
    color: #9ca3af;
    font-style: italic;
}

/* Secondary Stats Row */
.children-dashboard .stats-secondary-row {
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.children-dashboard .mini-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
    text-align: center;
}

.children-dashboard .mini-stat-icon {
    font-size: 1.1em;
    color: #6c757d;
    margin-bottom: 3px;
}

.children-dashboard .mini-stat-value {
    font-size: 1.3em;
    font-weight: bold;
    color: #2c3e50;
    line-height: 1;
}

.children-dashboard .mini-stat-label {
    font-size: 0.75em;
    color: #9ca3af;
    font-weight: 500;
}

/* Card Alert */
.children-dashboard .card-alert {
    padding: 12px 25px;
    background: #fff3cd;
    border-top: 1px solid #ffc107;
    color: #856404;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.children-dashboard .card-alert i {
    font-size: 1.1em;
}

/* Card Footer */
.children-dashboard .card-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.children-dashboard .card-footer > div:first-child {
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 0.9em;
}

.children-dashboard .card-footer > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.children-dashboard .card-footer .birth-year-stat {
    flex: 1;
    min-width: 120px;
    padding: 8px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.children-dashboard .card-footer .birth-year-stat:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.children-dashboard .card-footer .birth-year-stat > div:first-child {
    font-weight: bold;
    color: #337ab7;
    margin-bottom: 3px;
}

.children-dashboard .card-footer .birth-year-stat > div:nth-child(2) {
    font-size: 0.85em;
    color: #6c757d;
}

.children-dashboard .card-footer .birth-year-stat > div:last-child {
    font-size: 0.75em;
    color: #9ca3af;
    margin-top: 2px;
}

/* Compact Hours Card Styles - Modern Low Profile Design */
.children-dashboard .hours-card-compact {
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

.children-dashboard .card-header-compact {
    padding: 12px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.children-dashboard .card-title-compact {
    display: flex;
    align-items: center;
    font-size: 1.25em;
    font-weight: 600;
    color: #2c3e50;
    gap: 8px;
}

.children-dashboard .card-title-compact i {
    color: #5bc0de;
    font-size: 1.375em;
}

.children-dashboard .card-progress-circle-compact {
    width: 40px;
    height: 40px;
    position: relative;
    flex-shrink: 0;
}

.children-dashboard .card-progress-circle-compact .ring-background {
    border-width: 4px;
}

.children-dashboard .card-progress-circle-compact .ring-fill {
    border-width: 4px;
}

.children-dashboard .card-progress-circle-compact .ring-text {
    font-size: 0.94em;
}

.children-dashboard .card-body-compact {
    padding: 16px 20px;
}

.children-dashboard .stats-row-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.children-dashboard .stats-row-secondary {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.children-dashboard .stat-item-compact {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 10px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.children-dashboard .stat-item-compact:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.children-dashboard .stat-item-compact.stat-primary-compact {
    border-left-color: #337ab7;
}

.children-dashboard .stat-item-compact.stat-success-compact {
    border-left-color: #5cb85c;
}

.children-dashboard .stat-item-compact.stat-warning-compact {
    border-left-color: #f0ad4e;
}

.children-dashboard .stat-icon-compact {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95em;
    flex-shrink: 0;
    margin-bottom: 36px;
}

.children-dashboard .stat-primary-compact .stat-icon-compact {
    background: linear-gradient(135deg, #337ab7, #5a9bd4);
    color: white;
}

.children-dashboard .stat-success-compact .stat-icon-compact {
    background: linear-gradient(135deg, #5cb85c, #7bc97b);
    color: white;
}

.children-dashboard .stat-warning-compact .stat-icon-compact {
    background: linear-gradient(135deg, #f0ad4e, #f7c371);
    color: white;
}

.children-dashboard .stat-content-compact {
    flex: 1;
    min-width: 0;
}

.children-dashboard .stat-value-compact {
    font-size: 1.75em;
    font-weight: 700;
    margin-bottom: 2px;
    line-height: 1.2;
    color: #2c3e50;
}

.children-dashboard .stat-label-compact {
    font-size: 1.25em;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 2px;
}

.children-dashboard .stat-subtitle-compact {
    font-size: 1.05em;
    color: #9ca3af;
    font-weight: 700;
}

.children-dashboard .basket-hours-details {
    margin-top: 4px;
    font-size: 1.125em;
    line-height: 1.4;
    color: #6c757d;
    font-weight: 600;
}

.children-dashboard .basket-hours-details i {
    font-size: 1.05em;
    margin-left: 4px;
}

.children-dashboard .basket-hours-details span {
    white-space: nowrap;
}

.children-dashboard .mini-stat-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.children-dashboard .mini-stat-compact:hover {
    background: #e9ecef;
    transform: translateX(-2px);
}

.children-dashboard .mini-stat-icon-compact {
    font-size: 1.375em;
    color: #6c757d;
    width: 28px;
    text-align: center;
}

.children-dashboard .mini-stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.children-dashboard .mini-stat-value-compact {
    font-size: 1.44em;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.children-dashboard .mini-stat-label-compact {
    font-size: 1.05em;
    color: #9ca3af;
    font-weight: 600;
}

.children-dashboard .card-alert-compact {
    padding: 10px 20px;
    background: #fff3cd;
    border-top: 1px solid #ffc107;
    color: #856404;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.children-dashboard .card-alert-compact i {
    font-size: 1em;
}

/* Responsive dashboard - similar to worker_dashboard */
@media (max-width: 768px) {
    .children-dashboard .summary-dashboard {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        margin-bottom: 15px !important;
        padding: 0 5px !important;
        max-width: 100% !important;
    }
    
    .children-dashboard .card-header {
        padding: 10px 15px 8px 15px !important;
    }
    
    .children-dashboard .card-body {
        padding: 10px 15px !important;
    }
    
    .children-dashboard .stats-grid {
        gap: 12px !important;
    }
    
    .children-dashboard .stats-main-row {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
        gap: 15px !important;
    }
    
    .children-dashboard .stat-item {
        padding: 10px 12px !important;
        gap: 10px !important;
    }
    
    .children-dashboard .stat-icon {
        width: 35px !important;
        height: 35px !important;
        font-size: 1em !important;
    }
    
    .children-dashboard .stat-value {
        font-size: 1.3em !important;
    }
    
    /* Compact card responsive */
    .children-dashboard .card-header-compact {
        padding: 10px 15px !important;
    }
    
    .children-dashboard .card-title-compact {
        font-size: 1.15em !important;
    }
    
    .children-dashboard .card-title-compact i {
        font-size: 1.3em !important;
    }
    
    .children-dashboard .card-progress-circle-compact .ring-text {
        font-size: 0.88em !important;
    }
    
    .children-dashboard .card-body-compact {
        padding: 12px 15px !important;
    }
    
    .children-dashboard .stats-row-compact {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    .children-dashboard .stats-row-secondary {
        margin-top: 10px !important;
        padding-top: 10px !important;
    }
    
    .children-dashboard .stat-item-compact {
        padding: 10px 12px !important;
        gap: 10px !important;
    }
    
    .children-dashboard .stat-icon-compact {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.9em !important;
        margin-bottom: 32px !important;
    }
    
    .children-dashboard .stat-value-compact {
        font-size: 1.5em !important;
    }
    
    .children-dashboard .stat-label-compact {
        font-size: 1.1em !important;
    }
    
    .children-dashboard .stat-subtitle-compact {
        font-size: 0.95em !important;
    }
    
    .children-dashboard .basket-hours-details {
        font-size: 1em !important;
    }
    
    .children-dashboard .mini-stat-compact {
        padding: 6px 10px !important;
        gap: 8px !important;
    }
    
    .children-dashboard .mini-stat-value-compact {
        font-size: 1.25em !important;
    }
    
    .children-dashboard .mini-stat-label-compact {
        font-size: 0.95em !important;
    }
}

@media (max-width: 480px) {
    .children-dashboard .summary-dashboard {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        margin-bottom: 10px !important;
    }
    
    .children-dashboard .card-header {
        padding: 8px 12px 6px 12px !important;
    }
    
    .children-dashboard .card-body {
        padding: 8px 12px !important;
    }
    
    .children-dashboard .card-title {
        font-size: 0.9em !important;
    }
    
    .children-dashboard .card-progress-circle {
        width: 35px !important;
        height: 35px !important;
    }
    
    .children-dashboard .stats-main-row {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    .children-dashboard .stat-item {
        padding: 8px 10px !important;
        gap: 8px !important;
    }
    
    .children-dashboard .stat-icon {
        width: 30px !important;
        height: 30px !important;
    }
    
    /* Compact card mobile */
    .children-dashboard .card-header-compact {
        padding: 8px 12px !important;
    }
    
    .children-dashboard .card-title-compact {
        font-size: 1.125em !important;
    }
    
    .children-dashboard .card-title-compact i {
        font-size: 1.25em !important;
    }
    
    .children-dashboard .card-progress-circle-compact .ring-text {
        font-size: 0.85em !important;
    }
    
    .children-dashboard .card-progress-circle-compact {
        width: 32px !important;
        height: 32px !important;
    }
    
    .children-dashboard .card-body-compact {
        padding: 10px 12px !important;
    }
    
    .children-dashboard .stat-item-compact {
        padding: 8px 10px !important;
        gap: 8px !important;
    }
    
    .children-dashboard .stat-icon-compact {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.85em !important;
        margin-bottom: 28px !important;
    }
    
    .children-dashboard .stat-value-compact {
        font-size: 1.375em !important;
    }
    
    .children-dashboard .stat-label-compact {
        font-size: 1.2em !important;
    }
    
    .children-dashboard .stat-subtitle-compact {
        font-size: 1em !important;
    }
    
    .children-dashboard .basket-hours-details {
        font-size: 1.05em !important;
    }
    
    .children-dashboard .mini-stat-compact {
        padding: 6px 8px !important;
        gap: 6px !important;
    }
    
    .children-dashboard .mini-stat-icon-compact {
        width: 24px !important;
        font-size: 1.25em !important;
    }
    
    .children-dashboard .mini-stat-value-compact {
        font-size: 1.2em !important;
    }
    
    .children-dashboard .mini-stat-label-compact {
        font-size: 1em !important;
    }
}
