/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #E86F4A;
    --primary-light: #FEF3EE;
    --primary-dark: #D35F3D;
    --success: #10B981;
    --success-light: #D1FAE5;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 12px;
    --radius-lg: 16px;
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--gray-800);
    background: var(--gray-100);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--gray-100) 100%);
}

.login-screen {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-screen.hidden {
    display: none;
}

.app-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 
        0 8px 20px rgba(232, 111, 74, 0.4),
        0 16px 40px rgba(232, 111, 74, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
}

.app-icon::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.2), transparent);
    border-radius: 18px 18px 50% 50%;
}

.app-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.app-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.app-subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 32px;
}

.login-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-align: left;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 10px 20px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.login-option:hover {
    transform: translateY(-3px);
    border-color: var(--primary-light);
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.1),
        0 16px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.login-option:active {
    transform: translateY(-1px);
}

.option-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.option-icon.teacher {
    background: var(--primary-light);
    color: var(--primary);
}

.option-icon.parent {
    background: var(--success-light);
    color: var(--success);
}

.option-icon svg {
    width: 24px;
    height: 24px;
}

.option-icon.large {
    width: 64px;
    height: 64px;
}

.option-icon.large svg {
    width: 32px;
    height: 32px;
}

.option-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.option-title {
    font-weight: 600;
    color: var(--gray-800);
}

.option-desc {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.option-arrow {
    width: 20px;
    height: 20px;
    color: var(--gray-400);
}

.back-btn {
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-bottom: 20px;
}

.back-btn svg {
    width: 24px;
    height: 24px;
    color: var(--gray-600);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h2 {
    font-size: 1.5rem;
    margin-top: 16px;
}

.login-form {
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    padding: 28px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 10px 20px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    outline: none;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: linear-gradient(145deg, #ffffff, #f8f8f8);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.06),
        0 1px 0 rgba(255, 255, 255, 0.8);
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 
        0 0 0 3px var(--primary-light),
        inset 0 2px 4px rgba(0, 0, 0, 0.04);
    background: white;
}

.form-group small {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 6px;
}

.error-message {
    background: var(--danger-light);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 
        0 4px 12px rgba(232, 111, 74, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(232, 111, 74, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(232, 111, 74, 0.4),
        inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #DC2626);
    color: white;
    box-shadow: 
        0 4px 12px rgba(239, 68, 68, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-block {
    width: 100%;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-group {
    display: flex;
    gap: 12px;
}

.btn-group .btn {
    flex: 1;
}

/* App Container */
.app-container {
    min-height: 100vh;
    background: var(--gray-100);
    padding-bottom: 20px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
}

@media (min-width: 601px) {
    body {
        background: #e5e7eb;
    }
}

/* Header */
.app-header {
    background: linear-gradient(145deg, #ffffff, #f8f8f8);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.04),
        0 4px 12px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 12px rgba(232, 111, 74, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.header-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.parent-header .header-icon,
.parent-icon {
    background: var(--success) !important;
}

.header-date {
    display: flex;
    flex-direction: column;
}

.date-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.parent-header .date-label {
    color: var(--success);
}

.date-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
}

.header-actions {
    display: flex;
    gap: 8px;
}

.header-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(145deg, #f5f5f5, #e8e8e8);
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.header-btn svg {
    width: 22px;
    height: 22px;
    color: var(--gray-600);
}

.header-btn:hover {
    background: linear-gradient(145deg, #ebebeb, #dfdfdf);
    transform: translateY(-1px);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.header-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.06),
        inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.header-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 
        0 4px 12px rgba(232, 111, 74, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.header-btn.active svg {
    color: white;
}

/* Main Content */
.main-content {
    padding: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-info {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Student List */
.student-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.student-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    border-radius: 16px;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 10px 20px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: grab;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.8);
    transform: translateY(0);
}

.student-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255,255,255,0.5), transparent);
    pointer-events: none;
}

.student-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 12px rgba(0, 0, 0, 0.08),
        0 16px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.student-card:active {
    cursor: grabbing;
    transform: scale(1.02) translateY(-4px);
    box-shadow: 
        0 12px 20px rgba(0, 0, 0, 0.15),
        0 20px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    z-index: 100;
}

.student-card.dragging {
    opacity: 0.9;
    transform: scale(1.03) rotate(1deg);
    box-shadow: 
        0 20px 40px rgba(232, 111, 74, 0.3),
        0 30px 60px rgba(0, 0, 0, 0.2);
    border-color: var(--primary);
    background: linear-gradient(145deg, #fff5f2, #ffffff);
}

.student-card.drag-over {
    border: 2px dashed var(--primary);
    background: var(--primary-light);
}

.drag-handle {
    color: var(--gray-400);
    cursor: grab;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
}

.drag-handle:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle svg {
    width: 20px;
    height: 20px;
}

.student-info {
    flex: 1;
    cursor: pointer;
    padding: 4px 0;
}

.student-name {
    display: block;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
    font-size: 1rem;
}

.student-hours {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.student-hours svg {
    width: 16px;
    height: 16px;
}

.hours-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    white-space: nowrap;
    box-shadow: 
        0 4px 12px rgba(232, 111, 74, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.hours-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.hours-btn:hover {
    transform: scale(1.05);
    box-shadow: 
        0 6px 20px rgba(232, 111, 74, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.hours-btn:hover::before {
    left: 100%;
}

.hours-btn:active {
    transform: scale(0.98);
}

.student-arrow {
    width: 24px;
    height: 24px;
    color: var(--gray-400);
    cursor: pointer;
    transition: all 0.2s;
}

.student-arrow:hover {
    color: var(--primary);
    transform: translateX(3px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--radius-lg);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 20px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 5vh;
}

.modal-content {
    background: linear-gradient(145deg, #ffffff, #f8f8f8);
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    padding: 24px;
    animation: modalSlide 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 40px 80px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.modal-large {
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-small {
    max-width: 320px;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.modal-header h3 {
    flex: 1;
    font-size: 1.25rem;
}

.modal-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.modal-icon svg {
    width: 24px;
    height: 24px;
}

.modal-close {
    width: 32px;
    height: 32px;
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hours Control */
.hours-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 20px 0;
}

.hours-btn-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

.hours-btn-large.minus {
    background: linear-gradient(145deg, #f0f0f0, #d8d8d8);
    color: var(--gray-700);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.hours-btn-large.plus {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 
        0 4px 16px rgba(232, 111, 74, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hours-btn-large:hover {
    transform: scale(1.1);
}

.hours-btn-large.minus:hover {
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.hours-btn-large.plus:hover {
    box-shadow: 
        0 8px 24px rgba(232, 111, 74, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.hours-btn-large:active {
    transform: scale(0.95);
}

.hours-display {
    text-align: center;
    min-width: 80px;
}

.hours-display span {
    display: block;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hours-display small {
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* Calendar */
.calendar-content {
    max-height: 60vh;
    overflow-y: auto;
    padding: 4px;
}

.calendar-day {
    padding: 16px;
    margin-bottom: 10px;
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.04),
        0 4px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.calendar-day:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.08),
        0 8px 16px rgba(0, 0, 0, 0.1);
}

.calendar-day.today {
    background: linear-gradient(145deg, #fff5f2, #ffe8e0);
    border: 1px solid var(--primary-light);
    box-shadow: 
        0 4px 12px rgba(232, 111, 74, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.calendar-day.future {
    background: linear-gradient(145deg, #ecfdf5, #d1fae5);
    border: 1px solid var(--success-light);
}

.calendar-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.calendar-date {
    font-weight: 600;
    color: var(--gray-800);
}

.calendar-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.calendar-day.future .calendar-badge {
    background: var(--success);
}

.today-tag {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 600;
    margin-left: 8px;
}

.calendar-dayname {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Date Detail View */
.date-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.date-detail-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-detail-date {
    font-weight: 600;
    font-size: 1rem;
    color: var(--gray-800);
}

.date-summary {
    background: linear-gradient(135deg, var(--primary-light), #ffd4c4);
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 16px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--gray-700);
    box-shadow: 0 2px 8px rgba(232, 111, 74, 0.15);
}

.date-summary strong {
    color: var(--primary);
    font-size: 1.1rem;
}

.date-students-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.date-student-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(145deg, #f8f8f8, #f0f0f0);
    border-radius: 14px;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.date-student-card.has-lesson {
    background: linear-gradient(145deg, #fff5f2, #ffe8e0);
    border-color: var(--primary);
    box-shadow: 
        0 4px 12px rgba(232, 111, 74, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.date-student-info {
    flex: 1;
}

.date-student-name {
    display: block;
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.date-student-rate {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.date-student-hours {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-hour-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    font-size: 1.3rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.date-hour-btn.minus {
    background: linear-gradient(145deg, #e8e8e8, #d8d8d8);
    color: var(--gray-600);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.date-hour-btn.plus {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 3px 10px rgba(232, 111, 74, 0.4);
}

.date-hour-btn:hover {
    transform: scale(1.1);
}

.date-hour-btn:active {
    transform: scale(0.95);
}

.date-hour-value {
    min-width: 40px;
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--gray-800);
}

/* Summary Card */
.summary-card {
    margin: 20px;
    padding: 20px;
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    border-radius: 20px;
    display: flex;
    gap: 16px;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 10px 20px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.summary-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
    border-radius: var(--radius);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.summary-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-light), #ffd4c4);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: 0 4px 8px rgba(232, 111, 74, 0.2);
}

.parent-summary .summary-icon {
    background: linear-gradient(135deg, var(--success-light), #a7f3d0);
    color: var(--success);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.2);
}

.summary-icon svg {
    width: 22px;
    height: 22px;
}

.summary-label {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 2px;
}

.summary-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-900);
}

/* Management Panel */
.management-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    flex: 1;
    padding: 16px;
    border-radius: var(--radius);
    text-align: center;
}

.stat-card.earning {
    background: var(--success-light);
    border: 1px solid var(--success);
}

.stat-card.pending {
    background: var(--warning-light);
    border: 1px solid var(--warning);
}

.stat-icon {
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.management-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.management-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.management-student {
    flex: 1;
}

.management-name {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.management-code {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--gray-500);
    background: var(--gray-200);
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
}

.management-info {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.management-debt {
    text-align: right;
}

.debt-amount {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
}

.debt-label {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Code Display */
.code-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gray-100);
    border-radius: var(--radius);
}

.code-display span {
    flex: 1;
    font-family: monospace;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 3px;
}

/* Student Detail */
.detail-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.detail-stat {
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius);
    text-align: center;
}

.detail-stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.detail-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.detail-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.detail-actions .btn {
    flex: 1;
}

.detail-lessons {
    border-top: 1px solid var(--gray-200);
    padding-top: 16px;
}

.detail-lessons h4 {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.lesson-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.875rem;
}

/* Parent Panel Lessons */
.lesson-list {
    display: flex;
    flex-direction: column;
}

.month-divider {
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--gray-200), var(--gray-100));
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 12px;
    border-radius: 8px;
}

.month-divider:first-child {
    margin-top: 0;
}

.lesson-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    margin: 8px 0;
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    border-radius: 16px;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 10px 20px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.lesson-item:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 12px rgba(0, 0, 0, 0.08),
        0 16px 32px rgba(0, 0, 0, 0.12);
}

.lesson-item.today {
    background: linear-gradient(145deg, #fff5f2, #ffe8e0);
    border: 1px solid var(--primary-light);
    box-shadow: 
        0 4px 12px rgba(232, 111, 74, 0.15),
        0 10px 24px rgba(232, 111, 74, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.lesson-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
    padding: 8px;
    background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
    border-radius: 12px;
}

.lesson-day {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1;
}

.lesson-dayname {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 2px;
}

.lesson-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.lesson-hours {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 1rem;
}

.today-badge {
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(232, 111, 74, 0.4);
}

/* Checkbox */
.form-group label input[type="checkbox"] {
    margin-right: 8px;
}

/* Utility */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 480px) {
    .header-actions {
        gap: 4px;
    }
    
    .header-btn {
        width: 40px;
        height: 40px;
    }
    
    .summary-card {
        flex-direction: column;
    }
    
    .management-stats {
        flex-direction: column;
    }
    
    .detail-stats {
        grid-template-columns: 1fr;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: var(--gray-800);
    color: white;
    border-radius: var(--radius);
    font-size: 0.875rem;
    z-index: 2000;
    animation: toastIn 0.3s ease;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: var(--gray-100);
    padding: 4px;
    border-radius: var(--radius);
}

.tab-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.settings-tab {
    display: none;
}

.settings-tab.active {
    display: block;
}

/* Settings Student List */
.settings-student-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-bottom: 10px;
}

.settings-student-info {
    flex: 1;
}

.settings-student-name {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.settings-student-detail {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.settings-student-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

.btn-icon.edit {
    background: var(--primary-light);
    color: var(--primary);
}

.btn-icon.edit:hover {
    background: var(--primary);
    color: white;
}

.btn-icon.delete {
    background: var(--danger-light);
    color: var(--danger);
}

.btn-icon.delete:hover {
    background: var(--danger);
    color: white;
}

.btn-icon.payment {
    background: var(--success-light);
    color: var(--success);
}

.btn-icon.payment:hover {
    background: var(--success);
    color: white;
}

/* Accounting Stats */
.accounting-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.accounting-stat {
    padding: 16px;
    border-radius: var(--radius);
    text-align: center;
}

.accounting-stat.total {
    background: linear-gradient(135deg, var(--success-light), #A7F3D0);
    border: 1px solid var(--success);
}

.accounting-stat.pending {
    background: linear-gradient(135deg, var(--warning-light), #FDE68A);
    border: 1px solid var(--warning);
}

.accounting-stat.paid {
    background: linear-gradient(135deg, #DBEAFE, #BFDBFE);
    border: 1px solid #3B82F6;
}

.accounting-stat-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.accounting-stat-label {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.accounting-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

/* Accounting Student Row */
.accounting-student {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 8px;
}

.accounting-student-info {
    flex: 1;
}

.accounting-student-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.accounting-student-hours {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.accounting-student-debt {
    text-align: right;
    margin-right: 12px;
}

.debt-value {
    font-weight: 700;
    font-size: 1rem;
}

.debt-value.has-debt {
    color: var(--danger);
}

.debt-value.no-debt {
    color: var(--success);
}

.debt-label {
    font-size: 0.7rem;
    color: var(--gray-500);
}

/* Edit Form in Modal */
.edit-form-group {
    margin-bottom: 16px;
}

.edit-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.edit-form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.95rem;
}

.edit-form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.veli-code-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--gray-100);
    border-radius: 8px;
}

.veli-code-box code {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 2px;
}

.veli-code-box button {
    padding: 6px 12px;
    font-size: 0.8rem;
}
