/* Attendance v2 extracted styles */
/* ===== COMPONENT STYLES (layout/body controlled by ams-v2.css) ===== */

:root {
    --primary-color: #0a6f62;
    --primary-gradient: linear-gradient(135deg, #0a6f62 0%, #0f9a87 100%);
    --primary-light: #e6f4f2;
    --info-color: #0b7285;
    --warning-color: #d69e2e;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --box-shadow: 0 8px 20px rgba(10, 38, 42, 0.1);
    --transition: all 0.2s ease;
}



/* Student Hover Tooltip Styles - UPDATED FOR SMART POSITIONING */
.student-hover-tooltip {
    display: none; /* Start hidden */
    position: fixed;
    z-index: 10000;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    padding: 0;
    max-width: 320px;
    min-width: 280px;
    font-size: 12px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Position variants - will be added dynamically via JavaScript */
.student-hover-tooltip.position-right-top {
    /* Appears to the right, aligned to top of name */
}

.student-hover-tooltip.position-right-bottom {
    /* Appears to the right, aligned to bottom of name */
}

.student-hover-tooltip.position-left-top {
    /* Appears to the left, aligned to top of name */
}

.student-hover-tooltip.position-left-bottom {
    /* Appears to the left, aligned to bottom of name */
}

.student-hover-tooltip.visible {
    display: block;
    opacity: 1;
}

/* Ensure tooltip content is visible */
.student-hover-card {
    padding: 15px;
}

.tooltip-loading, .tooltip-error {
    padding: 20px;
    text-align: center;
    color: #666;
}

.hover-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.hover-header h6 {
    margin: 0 0 5px 0;
    color: #00897b;
    font-weight: 700;
    font-size: 13px;
}

.hover-header small {
    color: #666;
    font-size: 10px;
    font-weight: 600;
}

/* Updated Thinner Hover Stats */
.hover-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px; /* Reduced gap */
    margin: 12px 0; /* Reduced margin */
}

.hover-stat {
    text-align: center;
    padding: 6px 4px; /* Reduced padding - thinner height */
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 6px; /* Slightly smaller radius */
    border-left: 3px solid #00897b; /* Thinner border */
    transition: all 0.2s ease;
    min-height: 40px; /* Reduced minimum height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hover-stat:hover {
    transform: translateY(-1px); /* Smaller hover effect */
    box-shadow: 0 2px 6px rgba(0,0,0,0.1); /* Smaller shadow */
}

.hover-stat .stat-value {
    display: block;
    font-size: 14px; /* Slightly smaller font */
    font-weight: bold;
    color: #00897b;
    margin-bottom: 2px; /* Reduced margin */
    line-height: 1.2;
}

.hover-stat .stat-label {
    font-size: 9px; /* Smaller font */
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

/* Make the week stats section more compact too */
.week-stats {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 6px;
    padding: 8px; /* Reduced padding */
    margin: 8px 0; /* Reduced margin */
    border: 1px solid #e1f5fe;
}

.week-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px; /* Smaller font */
    font-weight: 600;
}

/* Adjust the attendance rate section to match */
.attendance-rate {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px; /* Reduced padding */
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f4c3 100%);
    border-radius: 6px;
    margin: 10px 0; /* Reduced margin */
    border: 1px solid #c8e6c9;
}

.rate-label {
    font-size: 10px; /* Smaller font */
    font-weight: 700;
    color: #555;
}

.rate-value {
    font-size: 14px; /* Slightly smaller */
    font-weight: bold;
    padding: 3px 6px; /* Reduced padding */
    border-radius: 15px; /* Smaller radius */
    background: white;
}

/* Make the entire card more compact */
.student-hover-card {
    padding: 12px; /* Reduced from 15px */
}

.hover-header {
    border-bottom: 1px solid #f0f0f0; /* Thinner border */
    padding-bottom: 8px; /* Reduced padding */
    margin-bottom: 8px; /* Reduced margin */
}

.hover-header h6 {
    margin: 0 0 3px 0; /* Reduced margin */
    color: #00897b;
    font-weight: 700;
    font-size: 12px; /* Slightly smaller */
}

.hover-header small {
    color: #666;
    font-size: 9px; /* Smaller */
    font-weight: 600;
}

/* Make recent attendance more compact */
.recent-attendance {
    border-top: 1px solid #f0f0f0; /* Thinner border */
    padding-top: 8px; /* Reduced padding */
    margin-top: 8px; /* Reduced margin */
}

/* Even Larger Recent Attendance */
.recent-attendance h6 {
    margin: 0 0 10px 0;
    font-size: 12px; /* Even larger heading */
    color: #444; /* Darker for better contrast */
}

.recent-record {
    display: grid;
    grid-template-columns: 60px 55px 55px 1fr; /* Wider columns */
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 11px; /* Even larger font */
    gap: 10px;
    min-height: 26px;
}

.recent-record .date {
    font-weight: 700;
    color: #333;
    font-size: 11px; /* Larger date */
}

.recent-record .time-in,
.recent-record .time-out {
    font-size: 11px; /* Larger times */
    font-weight: 600;
}

.recent-record .status {
    font-size: 14px; /* Much larger emoji/icons */
}

.hover-footer {
    text-align: center;
    padding-top: 8px; /* Reduced padding */
    border-top: 1px solid #f0f0f0;
    color: #999;
    font-size: 8px; /* Smaller */
    font-weight: 600;
}

/* Loading and Error States */
.tooltip-loading {
    padding: 30px 20px;
    text-align: center;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
}

.tooltip-loading:before {
    content: "⏳";
    font-size: 24px;
    display: block;
    margin-bottom: 10px;
}

.tooltip-error {
    padding: 20px;
    text-align: center;
    color: #dc3545;
    background: #f8f9fa;
    border-radius: 8px;
}

.hover-error {
    padding: 30px 20px;
    text-align: center;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Animation */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(-10px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

/* Make name cells relative for positioning */
.compact-name-cell {
    position: relative;
    min-width: 180px;
    white-space: normal;
    word-break: break-word;
}

.compact-name-display {
    position: relative;
    display: inline-block;
}

/* Enhanced hover effects for names */

/* Prevent tooltip interference */
.student-name-link {
    position: relative;
    z-index: 1;
}

.student-name-link.current-name {
    /* color set via inline style per day */
    font-weight: 600;
}

.student-name-link.current-name:hover {
    opacity: 0.8;
    text-decoration: none;
}

/* Historical name styling */
.historical-highlight {
    background: linear-gradient(135deg, #fff3e0 0%, #ffecb3 100%);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #ffd54f;
}

.historical-highlight:hover {
    background: linear-gradient(135deg, #ffecb3 0%, #ffd54f 100%);
}

/* Name history badge improvements */
.name-history-badge {
    margin-top: 2px;
}

.history-indicator {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 8px;
    font-weight: bold;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Name change start marker */
.name-change-marker {
    margin-top: 2px;
}

.change-indicator {
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 8px;
    font-weight: bold;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}




.chart-summary-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #00897b;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #00897b;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
}

/* Better chart container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* No data and error states */
.chart-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.chart-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}
	
	.transparent-bg {
    background: transparent;
	}
	
	.container-fluid {
    padding: 25px;
    max-width: 100%;
	}
	
	.page-header {
    margin-bottom: 2rem !important;
    position: relative;
    overflow: hidden;
    background: var(--primary-gradient);
    color: white;
    padding: 25px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    text-align: center;
	}
	
	.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 6s ease-in-out infinite;
	}
	
	.page-header h3 {
    margin: 0;
    font-weight: 700;
    font-size: 2.2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
	}
	
	/* View Toggle Styles */
	.btn-group-toggle .btn {
    border-radius: var(--border-radius-sm) !important;
    margin: 0 2px;
	}
	
	.btn-group-toggle .btn.active {
    background: var(--primary-gradient) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
	}
	
	/* Daily view specific styles */
	.daily-view-row {
    background-color: rgba(0, 150, 136, 0.03) !important;
	}
	
	.daily-view-row:hover {
    background-color: var(--primary-light) !important;
    transform: scale(1.002);
	}
	
	/* View summary cards */
	.card .row.text-center .col-md-3 {
    border-right: 1px solid #e9ecef;
	}
	
	.card .row.text-center .col-md-3:last-child {
    border-right: none;
	}
	
	.card .row.text-center h4 {
    margin-bottom: 5px;
    font-weight: 700;
	}
	
	/* Quick date navigation */
	.d-flex.flex-wrap .btn {
    margin-bottom: 5px;
    border-radius: 20px;
    font-weight: 500;
	}
	
	/* Responsive adjustments for view controls */
/* Compact Student Summary for Mobile */
@media (max-width: 768px) {
    /* Compact table styles */
    .student-summary-table {
        font-size: 0.8rem !important;
    }
    
    .student-summary-table th,
    .student-summary-table td {
        padding: 4px 6px !important;
        font-size: 0.75rem;
    }
    
    .student-summary-table th {
        white-space: nowrap;
        background: #f8f9fa !important;
        color: #333 !important;
        font-weight: 600;
    }
    
    /* Compact card layout for stats */
    .student-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin: 10px 0 !important;
    }
    
    .student-stat-card {
        padding: 8px !important;
        min-height: auto !important;
        text-align: center;
    }
    
    .student-stat-value {
        font-size: 1rem !important;
        font-weight: bold;
        margin-bottom: 2px !important;
    }
    
    .student-stat-label {
        font-size: 0.7rem !important;
        line-height: 1.2;
    }
    
    /* Compact header info */
    .student-header-info {
        padding: 8px !important;
        margin-bottom: 10px !important;
    }
    
    .student-header-info p {
        margin-bottom: 3px !important;
        font-size: 0.8rem;
    }
    
    /* Reduce spacing in sections */
    .student-section {
        margin-bottom: 15px !important;
        padding: 10px !important;
    }
    
    .student-section h5 {
        font-size: 0.9rem !important;
        margin-bottom: 8px !important;
        padding: 6px 10px !important;
    }
    
    /* Make tables more compact */
    .table-responsive {
        padding: 8px !important;
        margin: 5px 0 !important;
    }
    
    /* Specific compact layout for attendance records */
    .attendance-records-table th:nth-child(1),
    .attendance-records-table td:nth-child(1) {
        width: 15% !important; /* Date */
        min-width: 70px;
    }
    
    .attendance-records-table th:nth-child(2),
    .attendance-records-table td:nth-child(2) {
        width: 20% !important; /* Time In */
        min-width: 60px;
    }
    
    .attendance-records-table th:nth-child(3),
    .attendance-records-table td:nth-child(3) {
        width: 20% !important; /* Time Out */
        min-width: 60px;
    }
    
    .attendance-records-table th:nth-child(4),
    .attendance-records-table td:nth-child(4) {
        width: 25% !important; /* Status */
        min-width: 80px;
    }
    
    .attendance-records-table th:nth-child(5),
    .attendance-records-table td:nth-child(5) {
        width: 20% !important; /* Hours */
        min-width: 60px;
    }
    
    /* Compact status badges */
    .status-badge {
        padding: 2px 6px !important;
        font-size: 0.7rem !important;
        border-radius: 3px !important;
    }
    
    /* Hide less important columns on very small screens */
    @media (max-width: 480px) {
        .attendance-records-table th:nth-child(5),
        .attendance-records-table td:nth-child(5) {
            display: none; /* Hide Hours column */
        }
        
        .student-stats-grid {
            grid-template-columns: 1fr !important; /* Single column stats */
        }
        
        .student-header-info .text-muted {
            display: none; /* Hide secondary info */
        }
    }
    
    /* Ultra-compact for very small phones */
    @media (max-width: 360px) {
        .attendance-records-table th:nth-child(4),
        .attendance-records-table td:nth-child(4) {
            display: none; /* Hide Status column */
        }
        
        .student-summary-table {
            font-size: 0.7rem !important;
        }
        
        .student-summary-table th,
        .student-summary-table td {
            padding: 2px 4px !important;
        }
    }
}

/* Additional utility classes for compact display */
.compact-text {
    font-size: 0.8rem;
    line-height: 1.2;
}

.compact-table {
    font-size: 0.75rem;
}

.compact-table th,
.compact-table td {
    padding: 4px 6px !important;
}

.text-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Horizontal scroll for very compact tables */
.table-compact-scroll {
    overflow-x: auto;
    white-space: nowrap;
}

/* Stacked layout for very small screens */
.stacked-layout .student-info-item {
    display: block;
    margin-bottom: 5px;
}

.stacked-layout .student-info-label {
    font-weight: bold;
    font-size: 0.7rem;
    color: #666;
    display: block;
}

.stacked-layout .student-info-value {
    font-size: 0.8rem;
    display: block;
}
	
	/* Loading states */
	.loading-view {
    opacity: 0.7;
    pointer-events: none;
	}
	
	/* Print styles for different views */
	@media print {
    .btn-group-toggle,
    #dailyViewControls,
    .quick-date-navigation {
	display: none !important;
    }
    
    .daily-view-row {
	background-color: transparent !important;
    }
	}
	
	/* Day Separator Styles */
	.day-separator {
    background: transparent !important;
    border: none !important;
	}
	
	.day-separator td {
    background: linear-gradient(90deg, var(--primary-color) 0%, transparent 100%) !important;
    height: 4px !important;
    padding: 0 !important;
    border: none !important;
    position: relative;
	}
	
	.day-separator td div {
    position: relative;
    z-index: 2;
	}
	
	/* New day row highlighting */
	.attendance-row.new-day {
    border-top: 2px solid var(--primary-light) !important;
    background-color: rgba(0, 150, 136, 0.02) !important;
	}
	
	/* Hover effects for better visual separation */
	.attendance-row:hover {
    background-color: var(--primary-light) !important;
    transform: scale(1.001);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 150, 136, 0.1);
	}
	
	/* Compact name display improvements */
	.compact-name-display {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
	}
	
	.name-history-badge {
    margin-top: 2px;
	}
	
	.history-indicator {
    background: var(--warning-color);
    color: white;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 8px;
    font-weight: bold;
	}
	
	.name-change-marker {
    margin-top: 2px;
	}
	
	.change-indicator {
    background: #2e7d32;
    color: white;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 8px;
    font-weight: bold;
	}
	
	/* Date column styling improvements */
	.attendance-row td:nth-child(3) {
    font-weight: 600;
    position: relative;
	}
	
	/* Visual indicator for different days */
	.attendance-row.new-day td:nth-child(3)::before {
    content: "🆕";
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8px;
    opacity: 0.7;
	}
	
	/* ── Compact controls panel card ─────────────────────────── */
	.compact-controls-row {
		background: #ffffff;
		border-radius: 12px;
		padding: 18px 22px 20px;
		box-shadow: 0 4px 16px rgba(0,0,0,0.08);
		border-left: 5px solid var(--primary-color);
		margin-bottom: 24px !important;
	}

	.att-controls-header {
		display: flex;
		align-items: center;
		gap: 10px;
		margin-bottom: 16px;
		padding-bottom: 12px;
		border-bottom: 1px solid #e2e8f0;
	}

	.att-controls-icon {
		width: 36px;
		height: 36px;
		border-radius: 50%;
		background: var(--primary-gradient);
		display: flex;
		align-items: center;
		justify-content: center;
		color: #fff;
		font-size: 15px;
		flex-shrink: 0;
		box-shadow: 0 3px 8px rgba(0,137,123,0.35);
	}

	.att-controls-title {
		margin: 0;
		font-size: 15px;
		font-weight: 700;
		color: #0f172a;
		flex-grow: 1;
	}

	.att-db-badge {
		display: inline-flex;
		align-items: center;
		gap: 5px;
		background: var(--primary-light);
		color: var(--primary-color);
		border: 1px solid var(--primary-color);
		border-radius: 20px;
		padding: 3px 12px;
		font-size: 12px;
		font-weight: 600;
		white-space: nowrap;
	}

	/* GRID LAYOUT FOR PERFECT ALIGNMENT */
	.controls-flex-container {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(220px, 1fr) minmax(350px, 2fr) auto;
    gap: 20px;
    align-items: stretch; /* Ensure consistency */
    width: 100%;
    min-height: 56px;
	}
	
	.control-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: auto;
    min-height: 56px;
	}
	
	/* SPECIFIC CONTROL POSITIONS */
	.control-database {
    grid-column: 1;
	}
	
	.control-rows {
    grid-column: 2;
	}
	
	.control-search {
    grid-column: 3;
	}
	
	.control-edit {
    grid-column: 4;
    display: flex;
    align-items: center;
    justify-content: center;
	}
	
	/* CONSISTENT HEIGHT FOR ALL INPUT GROUPS */
	.compact-controls-row .input-group {
    height: 56px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    transition: var(--transition);
    border: 2px solid transparent;
    display: flex;
    align-items: stretch;
    min-height: 56px;
    flex-shrink: 0;
	}
	
	.compact-controls-row .input-group:focus-within {
    border-color: var(--primary-color);
    /* Updated box shadow to use teal tint */
    box-shadow: 0 6px 20px rgba(0, 150, 136, 0.25);
    transform: translateY(-2px);
	}
	
	.compact-controls-row .input-group:hover {
    /* Updated box shadow to use teal tint */
    box-shadow: 0 6px 20px rgba(0, 150, 136, 0.2);
    transform: translateY(-1px);
	}
	
	/* CONSISTENT FORM CONTROL STYLING */
	.compact-controls-row .form-control {
    font-size: 1rem;
    padding: 16px 18px;
    border: none;
    background: #fafbfc;
    transition: var(--transition);
    font-weight: 500;
    height: 100%;
    line-height: 1.5;
    flex: 1;
	}
	
	.compact-controls-row .form-control:focus {
    background: white;
    box-shadow: none;
    outline: none;
	}
	
	/* INPUT GROUP TEXT */
	.compact-controls-row .input-group-text {
    font-size: 1rem;
    padding: 16px 18px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    font-weight: 600;
    min-width: 60px;
    justify-content: center;
    display: flex;
    align-items: center;
    height: 100%;
	}
	
	/* BUTTON STYLING */
	.compact-controls-row .btn {
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    transition: var(--transition);
    border-radius: var(--border-radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    flex-shrink: 0;
	}
	
	.compact-controls-row .btn-outline-primary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
	}
	
	.compact-controls-row .btn-outline-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    transition: var(--transition);
    z-index: 1;
	}
	
	.compact-controls-row .btn-outline-primary:hover::before {
    left: 0;
	}
	
	.compact-controls-row .btn-outline-primary:hover {
    color: white;
    transform: translateY(-2px);
    /* Updated box shadow to use teal tint */
    box-shadow: 0 6px 20px rgba(0, 150, 136, 0.4);
	}
	
	.compact-controls-row .btn-outline-primary span {
    position: relative;
    z-index: 2;
	}
	
	/* EDIT BUTTON - PERFECT SQUARE */
	.compact-controls-row .btn-info {
    background: var(--primary-gradient);
    color: white;
    padding: 16px;
    border-radius: var(--border-radius-sm);
    /* Updated box shadow to use teal tint */
    box-shadow: 0 4px 15px rgba(0, 150, 136, 0.4);
    flex-shrink: 0;
    height: 56px;
    width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    min-width: 56px;
	}
	
	.compact-controls-row .btn-info:hover {
    transform: translateY(-2px);
    /* Updated box shadow to use teal tint */
    box-shadow: 0 8px 25px rgba(0, 150, 136, 0.6);
	}
	
	/* SEARCH INDICATOR - FULL WIDTH */
	.search-indicator-row {
    grid-column: 1 / -1;
    margin-top: 15px;
    text-align: center;
	}
	
	.search-indicator {
    font-size: 0.9rem;
    margin-top: 15px;
    padding: 10px 18px;
    background: var(--primary-light);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-weight: 500;
	}
	
	.search-indicator i {
    margin-right: 10px;
    font-size: 1.1rem;
	}
	
	/* CURRENT DATABASE INFO - PROPERLY ALIGNED */
	.current-database-info {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: var(--primary-light);
    border-radius: var(--border-radius);
    border-left: 6px solid var(--primary-color);
    box-shadow: var(--box-shadow);
    font-weight: 600;
	}
	
	.current-database-info p {
    margin: 0 !important;
    font-size: 1.2rem !important;
    color: var(--dark-color);
	}
	
	/* ===== RESPONSIVE DESIGN - PERFECT ALIGNMENT ACROSS SCREENS ===== */
	
	/* Large Desktop */
	@media (min-width: 1400px) {
    .controls-flex-container {
	grid-template-columns: minmax(300px, 1fr) minmax(240px, 1fr) minmax(400px, 2fr) auto;
	gap: 25px;
    }
	}
	
	/* Desktop */
	@media (min-width: 1200px) and (max-width: 1399px) {
    .controls-flex-container {
	grid-template-columns: minmax(280px, 1fr) minmax(220px, 1fr) minmax(350px, 2fr) auto;
	gap: 20px;
    }
	}
	
	/* Tablet Landscape */
	@media (max-width: 1199px) and (min-width: 992px) {
    .controls-flex-container {
	grid-template-columns: minmax(260px, 1fr) minmax(200px, 1fr) minmax(300px, 2fr) auto;
	gap: 18px;
    }
    
    .compact-controls-row .input-group {
	height: 52px;
    }
    
    .compact-controls-row .form-control,
    .compact-controls-row .input-group-text {
	padding: 14px 16px;
	font-size: 0.95rem;
    }
    
    .compact-controls-row .btn {
	height: 52px;
	padding: 14px 20px;
    }
	}
	
	/* Tablet Portrait - 2x2 Grid */
	@media (max-width: 991px) and (min-width: 768px) {
    .compact-controls-row {
	padding: 20px;
    }
    
    .controls-flex-container {
	grid-template-columns: 1fr 1fr;
	grid-template-rows: auto auto;
	gap: 15px;
    }
    
    .control-database { 
	grid-column: 1; 
	grid-row: 1; 
    }
    .control-rows { 
	grid-column: 2; 
	grid-row: 1; 
    }
    .control-search { 
	grid-column: 1 / span 2; 
	grid-row: 2; 
    }
    .control-edit { 
	grid-column: 2; 
	grid-row: 1; 
	justify-self: end; 
    }
    
    .control-search .input-group {
	min-width: 100%;
    }
	}
	
	/* Mobile Landscape - Single Column */
	@media (max-width: 767px) and (min-width: 576px) {
    .compact-controls-row {
	padding: 18px;
    }
    
    .controls-flex-container {
	grid-template-columns: 1fr;
	gap: 12px;
    }
    
    .control-database,
    .control-rows,
    .control-search,
    .control-edit {
	grid-column: 1;
	grid-row: auto;
    }
    
    .control-edit {
	justify-self: start;
	margin-top: 10px;
    }
    
    .compact-controls-row .input-group {
	height: 50px;
    }
    
    .compact-controls-row .form-control,
    .compact-controls-row .input-group-text {
	padding: 12px 14px;
	font-size: 0.95rem;
    }
    
    .compact-controls-row .btn {
	height: 50px;
	padding: 12px 18px;
	font-size: 0.95rem;
    }
	}
	
	/* Mobile Portrait - Stacked Layout */
	@media (max-width: 575px) {
    .compact-controls-row {
	padding: 20px;
    }
    
    .controls-flex-container {
	grid-template-columns: 1fr;
	gap: 15px;
    }
    
    .control-database,
    .control-rows,
    .control-search,
    .control-edit {
	grid-column: 1;
	grid-row: auto;
	width: 100%;
    }
    
    .control-database .input-group,
    .control-rows .input-group,
    .control-search .input-group {
	min-width: 100%;
    }
    
    .compact-controls-row .input-group {
	height: 52px;
    }
    
    .compact-controls-row .form-control,
    .compact-controls-row .input-group-text {
	padding: 14px 16px;
	font-size: 1rem;
    }
    
    .compact-controls-row .btn {
	height: 52px;
	padding: 14px 20px;
	font-size: 1rem;
	width: 100%;
    }
    
    .compact-controls-row .btn-info {
	width: 100%;
	min-width: auto;
    }
	}
	
	/* ===== REST OF THE STYLES (Color Updates) ===== */
	
	/* Form Controls */
	.form-control, .form-inline select {
    border-radius: var(--border-radius-sm);
    border: 2px solid #e8ecef;
    transition: var(--transition);
    padding: 12px 16px;
    font-size: 1rem;
    background: #fafbfc;
	}
	
	.form-control:focus, .form-inline select:focus {
    border-color: var(--primary-color);
    /* Updated box shadow to use teal tint */
    box-shadow: 0 0 0 0.3rem rgba(0, 150, 136, 0.15);
    background: white;
    outline: none;
	}
	
	/* Buttons */
	.btn {
    border-radius: var(--border-radius-sm);
    padding: 12px 24px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
	}
	
	.btn-primary {
    background: var(--primary-gradient);
    /* Updated box shadow to use teal tint */
    box-shadow: 0 4px 15px rgba(0, 150, 136, 0.4);
    color: white;
	}
	
	.btn-primary:hover {
    transform: translateY(-2px);
    /* Updated box shadow to use teal tint */
    box-shadow: 0 8px 25px rgba(0, 150, 136, 0.6);
	}
	
	/* Cards */
	.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    margin-bottom: 25px;
	}
	
	.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
	}
	
	.card-header {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 20px 25px;
    font-weight: 700;
	}
	
	/* Tables */
	.table-responsive {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 25px;
    width: 100%;
    overflow-x: auto;
	}
	
	.table thead th {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 16px 12px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
	}
	
	/* Tabs */
	.nav-tabs {
    border: none;
    background: white;
    padding: 15px 15px 0;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    box-shadow: var(--box-shadow);
	}
	
	.nav-tabs .nav-link {
    border: none;
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
    padding: 16px 25px;
    font-weight: 600;
    transition: var(--transition);
	}
	
	.nav-tabs .nav-link.active {
    background: var(--primary-gradient);
    color: white;
    /* Updated box shadow to use teal tint */
    box-shadow: 0 -4px 12px rgba(0, 150, 136, 0.3);
	}
	
	/* Alerts */
	.alert {
    border: none;
    border-radius: var(--border-radius);
    border-left: 6px solid;
    box-shadow: var(--box-shadow);
    padding: 20px 25px;
    font-weight: 500;
	}
	
	.alert-info {
    /* Updated info alert background for a better look */
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
    border-left-color: var(--info-color);
    color: #055160;
	}
	
	/* Scrollbar */
	::-webkit-scrollbar {
    width: 10px;
    height: 10px;
	}
	
	::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
	}
	
	::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 6px;
	}
	
	/* Utility Classes */
	.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
	}
	
	.bg-gradient-primary {
    background: var(--primary-gradient) !important;
	}
	
	/* Print Styles */
	@media print {
    .compact-controls-row,
    .nav-tabs,
    .btn {
	display: none !important;
    }
    
    .card {
	box-shadow: none !important;
	border: 1px solid #ddd !important;
    }
    
    .table-responsive {
	box-shadow: none !important;
	padding: 0 !important;
    }
	}
	
	/* ===== ANIMATIONS ===== */
	@keyframes shimmer {
    0%, 100% { 
	transform: translate(0, 0) rotate(0deg);
	opacity: 0.1;
    }
    50% { 
	transform: translate(-50px, -50px) rotate(180deg);
	opacity: 0.3;
    }
	}
	
	@keyframes fadeIn {
    from {
	opacity: 0;
	transform: translateY(30px) scale(0.95);
    }
    to {
	opacity: 1;
	transform: translateY(0) scale(1);
    }
	}
	
	/* Additional alignment utilities */
	.align-items-center {
    align-items: center !important;
	}
	
	.justify-content-center {
    justify-content: center !important;
	}
	
	.text-center {
    text-align: center !important;
	}
	
	.d-flex {
    display: flex !important;
	}
	
	/* Ensure all forms take full width */
	.control-item form {
    margin: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
	}
	
	/* Perfect vertical alignment for all content */
	.controls-flex-container > * {
    display: flex;
    align-items: center;
	}
	
	/* Add this to your existing CSS to improve grid stability */
	.controls-flex-container {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(220px, 1fr) minmax(350px, 2fr) auto;
    gap: 20px;
    align-items: stretch; /* Changed from center to stretch */
    width: 100%;
    min-height: 56px; /* Ensure minimum height */
	}
	
	.control-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: auto; /* Let grid control height */
    min-height: 56px; /* Consistent minimum */
	}
	
	/* Ensure all child elements fill their containers */
	.control-item > * {
    height: 100%;
	}
	
	.control-item form {
    margin: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
	}
	
	/* Force consistent heights for input groups */
	.compact-controls-row .input-group {
    height: 56px;
    min-height: 56px;
    flex-shrink: 0; /* Prevent shrinking */
	}
	
	/* Make sure buttons maintain consistent height */
	.compact-controls-row .btn {
    height: 56px;
    min-height: 56px;
    flex-shrink: 0;
	}
	
	/* Compact View Toggle */
	.compact-view-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50px;
	}
	
	.compact-view-toggle .btn-group {
    margin-bottom: 3px;
	}
	
	.compact-view-toggle .btn-xs {
    padding: 2px 6px;
    font-size: 0.7rem;
    border-radius: 3px;
	}
	
	.compact-view-toggle .form-control-sm {
    font-size: 0.7rem;
    padding: 2px 4px;
    height: 24px;
	}
	
	/* Responsive margin reduction */
.container-fluid {
    padding-left: 10px !important;
    padding-right: 10px !important;
}

@media (min-width: 768px) {
    .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

@media (min-width: 1200px) {
    .container-fluid {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* Table specific adjustments */
.table-responsive {
    margin-left: -5px;
    margin-right: -5px;
}

/* Cumulative days tooltip */
small.text-muted[title] {
    cursor: help;
    border-bottom: 1px dotted #999;
}

/* Tooltip styling */
.tooltip-inner {
    background-color: #333;
    color: white;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 12px;
}

/* Missed Weekdays Styles */
.missed-weekdays {
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
    margin-top: 10px;
}

.missed-weekdays h6 {
    margin: 0 0 8px 0;
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.missed-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.missed-date {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 9px;
    font-weight: 600;
    border: 1px solid #ffcdd2;
}

.missed-count {
    text-align: center;
}

.missed-count small {
    color: #d32f2f;
    font-weight: 600;
    font-size: 9px;
}

.name-change-notice {
    margin-top: 5px;
    padding: 3px 8px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    text-align: center;
}

.name-change-notice small {
    color: #856404;
    font-weight: 600;
    font-size: 8px;
}

