@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4F46E5;
    --primary-light: #6366F1;
    --secondary: #10B981;
    --dark: #1E293B;
    --gray: #64748B;
    --light: #F8FAFC;
    --white: #FFFFFF;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: var(--dark);
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 280px;
    background: var(--white);
    height: 100vh;
    position: fixed;
    border-right: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-brand h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.sidebar-menu {
    padding: 24px 16px;
    flex: 1;
    overflow-y: auto;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--gray);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.menu-item:hover, .menu-item.active {
    background: var(--primary);
    color: var(--white);
    transform: translateX(5px);
}

.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 32px;
    width: calc(100% - 280px);
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 16px 24px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.header-title h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.header-title p {
    color: var(--gray);
    font-size: 0.875rem;
}

.header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--secondary);
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-title {
    color: var(--gray);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.bg-primary-light { background: rgba(79, 70, 229, 0.1); color: var(--primary); }
.bg-success-light { background: rgba(16, 185, 129, 0.1); color: var(--secondary); }
.bg-warning-light { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.bg-danger-light { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

/* Table Styles */
.table-container {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    font-weight: 600;
    color: var(--gray);
    background: #f8fafc;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

tr:hover {
    background: #f8fafc;
}

.badge {
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-paid { background: rgba(16, 185, 129, 0.1); color: var(--secondary); }
.badge-unpaid { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.badge-partial { background: rgba(245, 158, 11, 0.1); color: var(--warning); }

/* Invoice Form */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Printable Invoice */
.invoice-print {
    background: white;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 20px;
}

.invoice-logo img {
    max-height: 80px;
}

.school-details {
    text-align: right;
}

.invoice-body {
    margin-bottom: 40px;
}

.invoice-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.signature-box {
    text-align: center;
    margin-top: 40px;
}

.signature-line {
    width: 200px;
    border-top: 1px solid var(--dark);
    margin-top: 60px;
    padding-top: 8px;
}

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

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
