/*************** STUDENT PROFILE & FINANCIAL SYSTEM STYLES ****************/

/* Profile Header */
.profile-header {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
    margin-bottom: 20px;
}

.profile-photo-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 48px;
    color: #667eea;
    border: 4px solid white;
    overflow: hidden;
}

.profile-photo-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 28px;
    margin: 10px 0;
    color: white;
}

.profile-details {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.student-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
}

/* Profile Actions */
.profile-actions-container {
    display: flex;
    gap: 5px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.profile-action-btn {
    padding: 10px 20px;
    border: none;
    background: white;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    color: #666;
}

.profile-action-btn:hover,
.profile-action-btn.active {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Info Cards */
.info-card-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.info-card {
    padding: 20px;
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.info-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.info-card-title {
    flex: 1;
    margin: 0;
    color: #333;
}

/* Personal Info Grid */
.personal-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.info-item-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-label {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.info-value {
    font-weight: 600;
    color: #333;
}

/* Financial Tabs */
.financial-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.financial-tab {
    padding: 10px 20px;
    border: none;
    background: white;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    color: #666;
    border: 1px solid #e0e0e0;
}

.financial-tab:hover,
.financial-tab.active {
    background: #28a745;
    color: white;
    border-color: #28a745;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Financial Content */
.fee-breakdown {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.fee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.fee-item:last-child {
    border-bottom: none;
}

.fee-item.total {
    font-weight: bold;
    background: #e9ecef;
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
}

.fee-label {
    color: #666;
}

.fee-amount {
    font-weight: 600;
    color: #333;
}

.fee-amount.success {
    color: #28a745;
}

.fee-amount.danger {
    color: #dc3545;
}

.fee-amount.warning {
    color: #ffc107;
}

/* Progress Bar */
.payment-progress {
    margin-top: 20px;
}

.progress-bar {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s ease;
}

.progress-text {
    text-align: right;
    font-size: 14px;
    color: #666;
}

/* Transaction Lists */
.transaction-list {
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s;
}

.transaction-item:hover {
    background: #f8f9fa;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-date {
    font-size: 12px;
    color: #666;
}

.transaction-amount {
    font-weight: bold;
    font-size: 16px;
}

.transaction-amount.deposit {
    color: #28a745;
}

.transaction-amount.withdrawal {
    color: #dc3545;
}

.transaction-method {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

/* Pocket Money Section */
.pocket-money-section {
    text-align: center;
}

.pocket-money-balance {
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
    padding: 30px;
    border-radius: 10px;
    color: white;
    margin-bottom: 20px;
}

.balance-amount {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 10px;
}

.balance-label {
    font-size: 14px;
    opacity: 0.9;
}

.pocket-money-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

/* Gadgets Section */
.gadgets-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
}

.gadget-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.gadget-stat {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    display: block;
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gadget-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #43e97b;
}

.gadget-info {
    flex: 1;
}

.gadget-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.gadget-serial {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.gadget-notes {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.gadget-date {
    font-size: 12px;
    color: #999;
}

.gadget-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.gadget-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 10px;
}

.gadget-status.status-deposited {
    background: #d4edda;
    color: #155724;
}

.gadget-status.status-returned {
    background: #d1ecf1;
    color: #0c5460;
}

.gadget-status.status-parent {
    background: #fff3cd;
    color: #856404;
}

.gadget-status.status-disposed {
    background: #f8d7da;
    color: #721c24;
}

/* Quick Actions */
.quick-financial-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.financial-action-btn {
    padding: 12px 15px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.financial-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Quick Actions Dropdown */
.quick-actions-dropdown {
    position: relative;
    display: inline-block;
}

.quick-actions-menu {
    display: none;
    position: absolute;
    background: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
    right: 0;
    top: 100%;
    margin-top: 5px;
}

.quick-actions-menu.show {
    display: block;
}

.quick-action-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    transition: background 0.3s;
}

.quick-action-item:hover {
    background: #f8f9fa;
}

/* Academic Card Styles */
.academic-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.academic-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.academic-stat {
    text-align: center;
}

.subject-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.subject-info {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.subject-name {
    font-weight: 600;
    color: #333;
}

.subject-grade {
    background: #007bff;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 5px;
    display: inline-block;
}

.subject-percentage {
    font-weight: bold;
    color: #333;
    min-width: 50px;
}

/* Attendance Card Styles */
.attendance-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
    margin-bottom: 20px;
}

.attendance-rate {
    flex: 1;
    min-width: 200px;
}

.rate-circle {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.rate-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.rate-value {
    font-size: 24px;
    font-weight: bold;
    color: #3b82f6;
    display: block;
}

.rate-label {
    font-size: 14px;
    color: #666;
}

.attendance-stats {
    flex: 2;
    min-width: 300px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.attendance-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.attendance-stat i {
    font-size: 24px;
    color: #3b82f6;
}

.attendance-stat.present i {
    color: #28a745;
}

.attendance-stat.absent i {
    color: #dc3545;
}

.attendance-stat.late i {
    color: #ffc107;
}

/* Discipline Card Styles */
.discipline-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.discipline-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.discipline-records {
    margin-top: 20px;
}

.discipline-record {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #ffc107;
}

.discipline-record.high {
    border-left-color: #dc3545;
}

.discipline-record.medium {
    border-left-color: #fd7e14;
}

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

.record-date {
    color: #666;
    font-size: 14px;
}

.record-severity {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.record-severity.severity-low {
    background: #d4edda;
    color: #155724;
}

.record-severity.severity-medium {
    background: #fff3cd;
    color: #856404;
}

.record-severity.severity-high {
    background: #f8d7da;
    color: #721c24;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #666;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    margin-bottom: 10px;
    font-size: 16px;
}

.empty-state small {
    font-size: 14px;
    color: #999;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-details {
        flex-direction: column;
        align-items: center;
    }
    
    .profile-action-btn,
    .financial-tab {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .personal-info-grid {
        grid-template-columns: 1fr;
    }
    
    .fee-item,
    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .gadget-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .gadget-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .subject-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .subject-percentage {
        align-self: flex-end;
    }
    
    .attendance-summary {
        flex-direction: column;
    }
    
    .attendance-stats {
        min-width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* Animation for tab switching */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.info-card-container > * {
    animation: fadeIn 0.3s ease-out;
}
/* Button Styles */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    text-decoration: none;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #333;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

/* Button Sizes */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 11px;
}

/* Button States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Status Badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.status-transferred {
    background: #d1ecf1;
    color: #0c5460;
}

.status-graduated {
    background: #fff3cd;
    color: #856404;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background: white;
    margin: 50px auto;
    border-radius: 10px;
    max-width: 800px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal-header .close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

.modal-header .close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
