:root {
    --primary-green: #15803d;
    --primary-green-dark: #166534;
    --primary-green-light: #22c55e;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-gradient: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
    --bg-glass: rgba(255, 255, 255, 0.25);
    --bg-glass-dark: rgba(255, 255, 255, 0.1);
    --border-color: #e1e5e9;
    --shadow: 0 2px 10px rgba(21, 128, 61, 0.1);
    --shadow-card: 0 8px 32px rgba(21, 128, 61, 0.15);
    --shadow-hover: 0 12px 40px rgba(21, 128, 61, 0.2);
    --border-radius: 12px;
    --border-radius-lg: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-primary);
    background: var(--bg-gradient);
    background-attachment: fixed;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideDown 0.6s ease;
}

@keyframes slideDown {
    from { 
        transform: translateY(-100%);
    }
    to { 
        transform: translateY(0);
    }
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
}

.demo-pill {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Pages */
.page {
    display: none;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(30px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

.page.active {
    display: block;
}

.page-container {
    max-width: 800px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: -1px;
}

/* Landing Page */
.landing-container {
    text-align: center;
    padding: 6rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.landing-container .page-title {
    margin-bottom: 4rem;
    font-size: 3rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: -1px;
}

.button-group {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius-lg);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    min-width: 160px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, #15803d, #22c55e);
    color: white;
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(34, 197, 94, 0.6);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.2);
}

.btn-back {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-3px);
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    min-width: auto;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(21, 128, 61, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 12px 40px rgba(21, 128, 61, 0.25);
}

.card h3 {
    margin-bottom: 1.5rem;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-green-light);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.error-message {
    color: #ff6b6b;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.error-message.show {
    display: block;
}

.hint {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 1rem;
    text-align: center;
}

/* Student Profile */
.student-profile {
    animation: fadeIn 0.5s ease;
}

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

.profile-info p {
    margin-bottom: 0.75rem;
    color: white;
    font-weight: 500;
}

.fees-info {
    position: relative;
    color: white;
}

.fees-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.status-pill {
    position: absolute;
    top: -1rem;
    right: 0;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.status-pill.paid {
    background: linear-gradient(135deg, #15803d, #16a34a);
    color: white;
}

.status-pill.partial {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.status-pill.unpaid {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.arabic-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-left: 0.5rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    border-radius: var(--border-radius);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

th {
    background: rgba(255, 255, 255, 0.1);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
    white-space: nowrap;
}

tbody tr {
    transition: all 0.2s ease;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.01);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    padding: 0.5rem;
    overflow-x: auto;
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius);
    white-space: nowrap;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.tab-btn.active {
    color: white;
    background: linear-gradient(135deg, #15803d, #22c55e);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.tab-content {
    display: none;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { 
        opacity: 0; 
        transform: scale(0.9) translateY(20px);
    }
    to { 
        opacity: 1; 
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

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

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: white;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Receipt */
.receipt-view {
    margin-top: 2rem;
}

.receipt-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.receipt-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.receipt-header h2 {
    color: #15803d;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.receipt-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 8rem;
    font-weight: 900;
    color: rgba(21, 128, 61, 0.03);
    z-index: 0;
    pointer-events: none;
}

.receipt-body {
    position: relative;
    z-index: 1;
}

.receipt-section {
    margin-bottom: 1.5rem;
}

.receipt-section h3 {
    color: #15803d;
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
}

.print-btn {
    width: 100%;
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    
    .receipt-card,
    .receipt-card * {
        visibility: visible;
    }
    
    .receipt-card {
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background: white !important;
        border: none;
        margin: 0;
        padding: 2rem;
        box-shadow: none;
    }
    
    .watermark {
        color: rgba(21, 128, 61, 0.1) !important;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem 0.5rem;
    }
    
    .card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .landing-container .page-title {
        font-size: 2rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .button-group {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        flex-shrink: 0;
        min-width: 120px;
    }
    
    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    table {
        font-size: 0.875rem;
    }
    
    th, td {
        padding: 0.5rem 0.25rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .landing-container {
        padding: 3rem 1rem;
    }
    
    .landing-container .page-title {
        font-size: 1.75rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .receipt-card {
        padding: 1rem;
    }
    
    .watermark {
        font-size: 4rem;
    }
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}
.panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 16px;
  margin: 16px 0;
}

.panel h3 {
  margin-bottom: 12px;
  font-size: 1.1rem;
  color: #333;
}
.page{display:none}.page.active{display:block}
.tab-content{display:none}.tab-content.active{display:block}
.tab-btn.active{outline:2px solid rgba(0,0,0,.08)}
