/* ============================================
   GLOBAL STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Poppins", sans-serif;
    background: linear-gradient(135deg, #5c2d91, #3b1d66);
    color: #fff;
    min-height: 100vh;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    transition: background 0.5s;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* ============================================
   NAVBAR - CLEAN & ORGANIZED
   ============================================ */

/* Main Container */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 65px;
    background-color: rgba(75, 33, 120, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 25px;
    gap: 15px;
    flex-wrap: wrap;
}

/* Left Section */
.nav-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Center Section */
.nav-right {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1 1 auto;
    flex-wrap: wrap;
    justify-content: flex-start;
    min-width: 0;
}

/* Right Actions Section */
.nav-actions-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: auto;
}

.nav-actions-right form {
    margin: 0;
}

/* ============================================
   LINKS
   ============================================ */

.navbar a {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    margin-right: 8px;
}

.navbar a:last-child {
    border-right: none;
    margin-right: 0;
}

.navbar .nav-actions-right a {
    border-right: none;
    margin-right: 0;
}

.navbar a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.navbar a svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ============================================
   BUTTONS
   ============================================ */

.navbar .btn-like,
.navbar button[type="submit"] {
    padding: 10px 18px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, #ff7a18, #af002d);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.navbar .btn-like:hover,
.navbar button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.navbar button[type="submit"] svg,
.navbar .btn-like svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   USER INFO
   ============================================ */

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

/* ============================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   ============================================ */

/* Large Desktop (max 1600px) */
@media (max-width: 1600px) {
    .navbar {
        padding: 0 25px;
    }
}

/* Desktop/Laptop (max 1400px) */
@media (max-width: 1400px) {
    .navbar {
        padding: 8px 20px;
        gap: 12px;
    }
    
    .navbar a {
        padding: 7px 11px;
        font-size: 12px;
        margin-right: 5px;
    }
    
    .navbar a svg {
        width: 15px;
        height: 15px;
    }
    
    .nav-right {
        gap: 4px;
    }
}

/* Small Laptop (max 1200px) */
@media (max-width: 1200px) {
    .navbar {
        padding: 8px 15px;
        gap: 10px;
    }
    
    .navbar a {
        padding: 6px 9px;
        font-size: 11px;
        margin-right: 4px;
        gap: 5px;
    }
    
    .nav-right {
        gap: 3px;
        flex-wrap: wrap;
    }
    
    .navbar .btn-like,
    .navbar button[type="submit"] {
        padding: 8px 14px;
        font-size: 11px;
    }
}

/* Tablet Landscape (max 1024px) */
@media (max-width: 1024px) {
    .navbar {
        padding: 8px 12px;
        gap: 8px;
    }
    
    .navbar a {
        padding: 5px 7px;
        font-size: 10px;
        margin-right: 3px;
        gap: 4px;
    }
    
    .navbar a svg {
        width: 13px;
        height: 13px;
    }
    
    .nav-right {
        gap: 2px;
        flex-wrap: wrap;
    }
    
    .navbar .btn-like,
    .navbar button[type="submit"] {
        padding: 7px 12px;
        font-size: 11px;
    }
    
    .user-info {
        padding: 5px 8px;
        gap: 6px;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .nav-actions-right {
        gap: 8px;
    }
}

/* Tablet Portrait (max 900px) */
@media (max-width: 900px) {
    .navbar {
        padding: 8px 10px;
        gap: 6px;
    }
    
    .nav-right {
        gap: 2px;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .navbar a {
        padding: 4px 6px;
        font-size: 10px;
        margin-right: 2px;
        gap: 3px;
    }
    
    .navbar a svg {
        width: 12px;
        height: 12px;
    }
    
    .user-info > div > div:last-child {
        display: none; /* Hide role on smaller tablets */
    }
    
    .navbar .btn-like,
    .navbar button[type="submit"] {
        padding: 6px 10px;
        font-size: 10px;
    }
}

/* Mobile/Small Tablet (max 768px) */
@media (max-width: 768px) {
    .navbar {
        padding: 8px;
        gap: 8px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .nav-left {
        justify-content: center;
        width: 100%;
        padding: 5px 0;
    }
    
    .nav-left a {
        font-size: 13px;
        font-weight: 600;
    }
    
    .nav-right {
        justify-content: center;
        gap: 3px;
        flex-wrap: wrap;
        width: 100%;
        padding: 8px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-actions-right {
        justify-content: center;
        gap: 10px;
        width: 100%;
        padding: 5px 0;
        margin-left: 0;
    }
    
    .navbar a {
        padding: 6px 8px;
        font-size: 10px;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        margin-right: 2px;
    }
    
    .navbar a svg {
        width: 12px;
        height: 12px;
    }
    
    .user-info > div {
        display: none; /* Hide user text info */
    }
    
    .user-info {
        padding: 6px;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .navbar .btn-like,
    .navbar button[type="submit"] {
        padding: 8px 14px;
        font-size: 11px;
    }
    
    .navbar button[type="submit"] svg,
    .navbar .btn-like svg {
        width: 13px;
        height: 13px;
    }
}

/* Small Mobile (max 480px) */
@media (max-width: 480px) {
    .navbar {
        padding: 6px 5px;
        gap: 6px;
    }
    
    .nav-right {
        flex-wrap: wrap;
        justify-content: center;
        gap: 2px;
    }
    
    .navbar a {
        padding: 4px 5px;
        font-size: 9px;
        margin-right: 1px;
        gap: 2px;
    }
    
    .navbar a svg {
        width: 11px;
        height: 11px;
    }
    
    .navbar .btn-like,
    .navbar button[type="submit"] {
        padding: 6px 10px;
        font-size: 9px;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .nav-actions-right {
        gap: 6px;
    }
}

/* Extra Small Mobile (max 375px) */
@media (max-width: 375px) {
    .navbar a {
        padding: 4px 5px;
        font-size: 9px;
        gap: 3px;
    }
    
    .navbar a svg {
        width: 11px;
        height: 11px;
    }
    
    .navbar .btn-like,
    .navbar button[type="submit"] {
        padding: 6px 10px;
        font-size: 9px;
        gap: 4px;
    }
    
    .nav-actions-right {
        gap: 6px;
    }
}

/* ===== Search Section ===== */
.search-loading {
    animation: fadePulse 1.2s ease-in-out infinite;
}
@keyframes fadePulse {
    0%,
    100% {
        opacity: 0.35;
    }
    50% {
        opacity: 0.8;
    }
}
.search-section {
    text-align: center;
    padding: 50px 20px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.search-section .top-logo {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    margin: 0 auto 16px;
    display: block;
}
.page-content {
    padding: 120px 30px 50px; /* top padding must be >= navbar height */
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 1s ease forwards;
}

#search-student {
    width: 80%;
    max-width: 500px;
    padding: 14px 25px;
    border-radius: 50px;
    border: none;
    margin-bottom: 35px;
    font-size: 16px;
    outline: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

#search-student:focus {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    transform: scale(1.02);
}

/* ===== Student Cards ===== */
/* Smooth hover animation for student cards */
.cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}

.student-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 20px;
    width: 220px;
    text-align: center;
    cursor: pointer;
    transform: translateZ(0) translateY(0) scale(1);
    transition:
        transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
        box-shadow 0.6s ease,
        background 0.6s ease,
        opacity 0.45s ease;
    will-change: transform;
}
.student-card.fade-start {
    opacity: 0; /* initial (before animation) */
    transform: translateY(4px) scale(0.985);
}
.student-card.fade-start.fade-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.search-section .cards-container {
    margin-top: 10px;
    gap: 20px;
}
.student-card .student-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.student-card .student-link:visited {
    color: inherit;
}

.student-card .student-link:focus-visible {
    outline: 2px solid #ffd861;
    outline-offset: 4px;
    border-radius: 12px;
}

.student-card:hover {
    transform: translateY(-12px) scale(2);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    background: rgba(255, 255, 255, 0.14);
}

/* Image */
.student-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 3px solid #fff;
    transform: translateZ(0) scale(1);
    transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.student-card:hover .student-photo {
    transform: scale(1.14);
}
/* ===== Unpaid Students Table ===== */
.unpaid-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    font-size: 14px;
}

.unpaid-table th,
.unpaid-table td {
    padding: 15px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
    transition: background 0.3s;
}

.unpaid-table th {
    background-color: rgba(255, 255, 255, 0.2);
    letter-spacing: 1px;
}

.unpaid-table tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.05);
}

.unpaid-table tr:hover {
    background-color: rgba(255, 255, 255, 0.15);
}
.unpaid-wrapper {
    max-width: 1250px;
    margin: 60px auto 80px;
    padding: 0 25px 40px;
}

.unpaid-title {
    font-size: 34px;
    letter-spacing: 1px;
    margin: 0 0 28px;
    text-align: center;
    font-weight: 600;
}

.unpaid-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    background: rgba(255, 255, 255, 0.07);
    padding: 18px 22px 20px;
    border-radius: 16px;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 30px;
}

.unpaid-filters .filter-group {
    display: flex;
    flex-direction: column;
    min-width: 190px;
    gap: 6px;
    flex: 1;
}

.unpaid-filters label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.unpaid-filters select {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 10px;
    outline: none;
    transition:
        border 0.3s,
        background 0.3s;
}

.unpaid-filters select:focus {
    border-color: #ffd861;
    background: rgba(255, 255, 255, 0.18);
}

.btn-filter {
    align-self: flex-end;
    padding: 12px 28px;
    background: linear-gradient(135deg, #ffb347, #ffcc33);
    color: #1d1d1d;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition:
        transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
        box-shadow 0.35s;
}

.btn-filter:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.55);
}

.table-scroll {
    overflow-x: auto;
    border-radius: 18px;
    box-shadow: 0 18px 42px -14px rgba(0, 0, 0, 0.55);
    position: relative;
}

.unpaid-table-pro {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.04)
    );
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    overflow: hidden;
    font-size: 15px;
}

.unpaid-table-pro thead th {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.22);
    color: #111;
    font-weight: 600;
    letter-spacing: 0.7px;
    font-size: 13px;
    text-transform: uppercase;
    padding: 16px 18px;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.unpaid-table-pro tbody td {
    padding: 18px 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    vertical-align: middle;
}

.unpaid-table-pro tbody tr:last-child td {
    border-bottom: none;
}

.unpaid-table-pro tbody tr {
    transition:
        background 0.45s,
        transform 0.45s;
}

.unpaid-table-pro tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.05);
}

.unpaid-table-pro tbody tr:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.td-student {
    min-width: 200px;
}

.td-student .student-meta {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 4px;
}

.badge {
    display: inline-block;
    padding: 6px 12px 5px;
    font-size: 12px;
    border-radius: 30px;
    letter-spacing: 0.5px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1;
}

.badge-paid {
    background: linear-gradient(135deg, #3ddc84, #20b35d);
    color: #0f281a;
    box-shadow: 0 4px 14px -4px rgba(32, 179, 93, 0.55);
}

.badge-late {
    background: linear-gradient(135deg, #ff6257, #ff2d55);
    color: #2d0907;
    box-shadow: 0 4px 14px -4px rgba(255, 45, 85, 0.55);
}

.row-late {
    background: rgba(255, 82, 82, 0.08) !important;
}

.row-late:hover {
    background: rgba(255, 82, 82, 0.18) !important;
}

.cur {
    font-size: 11px;
    opacity: 0.7;
    margin-left: 3px;
}

.empty-cell {
    padding: 38px 0;
    font-size: 15px;
    opacity: 0.75;
    letter-spacing: 0.5px;
}

@media (max-width: 860px) {
    .unpaid-filters {
        flex-direction: column;
    }
    .btn-filter {
        width: 100%;
    }
    .unpaid-title {
        font-size: 26px;
    }
    .unpaid-table-pro thead {
        font-size: 11px;
    }
    .unpaid-table-pro tbody td {
        padding: 14px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .unpaid-table-pro tbody tr,
    .btn-filter {
        transition: none;
    }
}
/* === Fix checkbox + label inline (place THIS BLOCK near END of file) */
.form-group.form-check {
    display: inline-flex !important; /* override .form-group (column) */
    flex-direction: row !important;
    align-items: center;
    gap: 6px;
    margin: 14px 0 24px;
    padding: 0;
}

/* ===== Expenses (compact, admin-like) ===== */
.expenses-page .page-title {
    margin-bottom: 10px;
}
.expenses-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    padding: 12px;
}
.expenses-page .top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.expenses-page .totals {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.expenses-page .totals .total {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: 600;
}
.expenses-page .totals .total-expenses {
    background: rgba(153, 27, 27, 0.85);
    border-color: rgba(254, 202, 202, 0.6);
}
.expenses-page .totals .total-income {
    background: rgba(22, 101, 52, 0.85);
    border-color: rgba(134, 239, 172, 0.6);
}
.expenses-page .totals .total-profit {
    background: rgba(29, 78, 216, 0.85);
    border-color: rgba(147, 197, 253, 0.6);
}

.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0;
    align-items: center;
}
.expenses-page .filter-bar .form-control,
.expenses-page .filter-bar .form-select {
    height: 28px;
    padding: 5px 8px;
    font-size: 12.5px;
    color: #fff;
}
.expenses-page .filter-bar .form-select {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
    transition:
        border-color 0.2s,
        box-shadow 0.2s,
        background 0.2s;
}
.expenses-page .filter-bar .form-control {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
    transition:
        border-color 0.2s,
        box-shadow 0.2s,
        background 0.2s;
    padding-left: 12px;
    padding-right: 12px;
}
.expenses-page .filter-bar .form-control:focus,
.expenses-page .filter-bar .form-select:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
    background: #1f2937;
}
.expenses-page .filter-bar .form-control::placeholder {
    color: rgba(255, 255, 255, 0.75);
}
/* remove number spinners */
.expenses-page .filter-bar input[type="number"]::-webkit-outer-spin-button,
.expenses-page .filter-bar input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}
.expenses-page .filter-bar input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}
.expenses-page .filter-bar select[name="month"] {
    width: 90px;
}
.expenses-page .filter-bar input[name="year"] {
    width: 100px;
}
.expenses-page .filter-bar select[name="category"],
.expenses-page .filter-bar select[name="payment_method"] {
    min-width: 140px;
}
.expenses-page .filter-bar input[name="q"] {
    min-width: 200px;
    flex: 1 1 220px;
}

.table-wrapper {
    overflow-x: auto;
}
.expenses-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.expenses-table th,
.expenses-table td {
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
}
.expenses-table thead th {
    background: rgba(255, 255, 255, 0.14);
}
.expenses-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.06);
}
.expenses-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.12);
}
.expenses-table .actions {
    display: flex;
    gap: 6px;
    align-items: center;
}
.expenses-table .actions .btn-chip {
    padding: 5px 9px;
    font-size: 12.5px;
}

/* Even, simple column widths and alignment */
.expenses-table th:nth-child(2),
.expenses-table td:nth-child(2) {
    width: 110px;
    text-align: right;
}
.expenses-table th:nth-child(3),
.expenses-table td:nth-child(3) {
    width: 160px;
}
.expenses-table th:nth-child(4),
.expenses-table td:nth-child(4) {
    width: 120px;
    text-align: center;
}
.expenses-table th:nth-child(5),
.expenses-table td:nth-child(5) {
    width: 110px;
    text-align: center;
}
.expenses-table th:nth-child(6),
.expenses-table td:nth-child(6) {
    width: 200px;
}
.expenses-table td.actions {
    white-space: nowrap;
}

/* Receipt thumbnails consistent */
.expenses-table td:nth-child(5) img {
    height: 32px !important;
    width: auto;
    border-radius: 6px;
}

/* Compact primary button on expenses page */
.expenses-page .btn-primary-like {
    padding: 8px 14px;
    font-size: 14px;
}

/* Style table links (non-buttons) inside expenses */
.expenses-table a:not(.btn-chip):not(.btn-primary-like) {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.35);
    padding-bottom: 1px;
}
.expenses-table a:not(.btn-chip):not(.btn-primary-like):hover {
    filter: brightness(1.1);
}

/* Pagination chips for expenses card */
.expenses-card .pagination {
    margin-top: 10px;
}
.expenses-card .pagination a,
.expenses-card .pagination span {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    margin-right: 6px;
}
.expenses-card .pagination .active span {
    background: rgba(117, 86, 155, 0.6);
    border-color: rgba(255, 255, 255, 0.35);
}

/* Reusable small button variant */
.btn-sm {
    padding: 7px 12px !important;
    font-size: 13px !important;
}

/* Secondary gradient button (purple) */
.btn-secondary-like {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #75569b, #5a3d86 71%);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.25s ease;
}
.btn-secondary-like:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45);
    filter: brightness(1.05);
}
.btn-secondary-like:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

/* Ghost pill button */
.btn-ghost {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-decoration: none;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}
.btn-ghost:active {
    transform: translateY(0);
}

/* Expense title links (table) */
.expenses-table .expense-link {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.35);
    padding-bottom: 1px;
}
.expenses-table .expense-link:hover {
    filter: brightness(1.08);
}

/* ===== Chip buttons (global, admin-like) ===== */
.btn-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 13px;
    text-decoration: none;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease;
}
.btn-chip:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}
.btn-chip:active {
    transform: translateY(0);
}
.btn-chip--secondary {
    background: rgba(117, 86, 155, 0.6);
    border-color: rgba(255, 255, 255, 0.35);
}
.btn-chip--danger {
    background: rgba(153, 27, 27, 0.8);
    border-color: rgba(254, 202, 202, 0.55);
}
.btn-chip--success {
    background: rgba(22, 101, 52, 0.85);
    border-color: rgba(134, 239, 172, 0.6);
}

.form-group.form-check .form-check-input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.form-group.form-check .form-check-label {
    margin: 0 !important; /* remove bottom margin from .form-group label */
    display: inline;
    line-height: 1;
    font-weight: 500;
    cursor: pointer;
}
/* ===== Small student photos in table ===== */
.student-photo-small {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.unpaid-table tr:hover .student-photo-small {
    transform: scale(1.1);
}
.unpaid-table-collapsible .detail-toggle {
    background: linear-gradient(135deg, #ffb347, #ffcc33);
    border: none;
    color: #222;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 24px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition:
        transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
        box-shadow 0.35s;
}
.unpaid-table-collapsible .detail-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px -8px rgba(0, 0, 0, 0.55);
}
.receipt-button {
    background: linear-gradient(135deg, #ffb347, #ffcc33);
    border: none;
    color: #222;
    padding: 8px 16px;
    font-size: 12px;

    font-weight: 600;
    border-radius: 24px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition:
        transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
        box-shadow 0.35s;
}
.receipt-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px -8px rgba(0, 0, 0, 0.55);
}
.detail-row {
    display: none;
    background: rgba(255, 255, 255, 0.06);
    transition: all 0.5s ease;
}
.detail-row.open {
    display: table-row;
}

.inner-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    overflow: hidden;
}
.inner-detail-table thead th {
    background: rgba(255, 255, 255, 0.18);
    padding: 10px 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.inner-detail-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.inner-detail-table tr:last-child td {
    border-bottom: none;
}
/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ===== Add Student Form ===== */
.page-title {
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 40px;
}

.student-form {
    background: rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 15px;
    max-width: 800px;
    margin: 0 auto 50px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    animation: fadeIn 1s ease;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 5px;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    outline: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    transition: all 0.3s ease;
}

/* Make native select dropdown options use dark background (Chrome/Edge/Firefox on Windows) */
.student-form select option,
.student-form select optgroup {
    background-color: #1f2937; /* dark slate */
    color: #f9fafb; /* near white */
}
.student-form select option:checked,
.student-form select option:hover {
    background-color: #374151; /* slightly lighter on hover/selected */
    color: #ffffff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    background-color: rgba(255, 255, 255, 0.2);
}

textarea {
    resize: vertical;
    min-height: 60px;
}

.btn-submit {
    display: block;
    width: 100%;
    padding: 14px 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(90deg, #ffd700, #ffb400);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-submit:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .student-card {
        width: 45%;
    }
    #search-student {
        width: 90%;
    }
}

@media (max-width: 480px) {
    .student-card {
        width: 90%;
    }
}
/* === Eleve show page styles === */
.eleve-profile-wrapper {
    max-width: 1250px;
    margin: 50px auto 80px;
    padding: 0 25px;
}
.eleve-header-card {
    display: flex;
    gap: 40px;
    background: linear-gradient(
        140deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.05)
    );
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    padding: 35px 40px;
    border-radius: 26px;
    box-shadow: 0 18px 42px -14px rgba(0, 0, 0, 0.55);
    flex-wrap: wrap;
    margin-bottom: 40px;
}
.photo-box {
    flex: 0 0 180px;
    display: flex;
    justify-content: center;
}
.profile-photo {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 28px;
    border: 4px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.65);
}
.info-box h1 {
    margin: 0 0 18px;
    font-size: 36px;
    letter-spacing: 1px;
}
.tags-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.tag {
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}
.meta-line {
    font-size: 14px;
    opacity: 0.85;
    margin: 0 0 18px;
}
.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-small {
    display: inline-block;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 14px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    letter-spacing: 0.4px;
    transition:
        transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
        box-shadow 0.45s;
}
.btn-small.primary {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #05202a;
}
.btn-small.neutral {
    background: rgba(255, 255, 255, 0.25);
    color: #111;
}
.btn-small.danger {
    background: linear-gradient(135deg, #ff4e50, #f9d423);
    color: #211;
}
.btn-small.receipt {
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #fff;
}
.btn-small:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.6);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 28px;
}
.panel {
    background: linear-gradient(
        150deg,
        rgba(255, 255, 255, 0.08),
        rgba(255, 255, 255, 0.04)
    );
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(5px);
    padding: 26px 26px 30px;
    border-radius: 24px;
    box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.panel.wide {
    grid-column: 1 / -1;
}
.panel h2 {
    margin: 0;
    font-size: 20px;
    letter-spacing: 0.6px;
}

.detail-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
}
.detail-list li {
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.07);
    padding: 10px 14px;
    border-radius: 12px;
    line-height: 1.3;
}
.detail-list li span {
    opacity: 0.7;
}

.empty-note {
    opacity: 0.7;
    font-size: 14px;
    padding: 12px 4px;
}

.pay-summary {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.pay-summary > div {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 13px;
    min-width: 150px;
}
.pay-summary span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    opacity: 0.7;
    letter-spacing: 0.6px;
    margin-bottom: 4px;
}

.table-scroll.small {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}
.mini-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}
.mini-table thead th {
    background: rgba(255, 255, 255, 0.18);
    padding: 12px 14px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.mini-table tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.mini-table tbody tr:last-child td {
    border-bottom: none;
}
.mini-table tbody tr.row-late {
    background: rgba(255, 72, 72, 0.07);
}
.mini-table tbody tr.row-late:hover {
    background: rgba(255, 72, 72, 0.14);
}
.mini-table tbody tr.row-ok:hover {
    background: rgba(255, 255, 255, 0.12);
}

.badge {
    display: inline-block;
    padding: 6px 12px 5px;
    font-size: 11px;
    border-radius: 30px;
    letter-spacing: 0.5px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1;
}
.badge-paid {
    background: linear-gradient(135deg, #3ddc84, #20b35d);
    color: #0f281a;
    box-shadow: 0 4px 14px -4px rgba(32, 179, 93, 0.55);
}
.badge-late {
    background: linear-gradient(135deg, #ff6257, #ff2d55);
    color: #2d0907;
    box-shadow: 0 4px 14px -4px rgba(255, 45, 85, 0.55);
}

@media (max-width: 860px) {
    .eleve-header-card {
        padding: 28px 26px;
    }
    .info-box h1 {
        font-size: 28px;
    }
    .profile-photo {
        width: 140px;
        height: 140px;
    }
}
.month-status td,
.month-status th {
    text-align: center;
    padding: 8px;
}

.legend {
    margin-top: 12px;
    display: flex;
    gap: 16px;
    font-size: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend .box {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: inline-block;
    border: 1px solid #ccc;
}
/*receipt style*/
.receipt-row td {
    text-align: center;
    padding-top: 8px;
}
.receipt-button {
    display: inline-block;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 10px;
    text-decoration: none;
    background: #111827;
    color: #fff;
}
.mini-table tbody tr.receipt-row td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08); /* adjust to your theme */
    text-align: center;
    background: rgba(0, 0, 0, 0.02);
    padding-top: 8px;
}

/* ===== Auth / Login Page ===== */
.auth-wrapper {
    min-height: calc(100vh - 120px); /* account for navbar + content padding */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 60px;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: linear-gradient(
        150deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.05)
    );
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 18px 45px -12px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    padding: 28px 28px 32px;
}

.auth-title {
    margin: 0 0 18px;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.6px;
}

.auth-errors {
    background: rgba(255, 72, 72, 0.1);
    border: 1px solid rgba(255, 72, 72, 0.3);
    color: #fff;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 14px;
}
.auth-errors ul {
    margin: 0;
    padding-left: 18px;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.auth-form label {
    font-size: 13px;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.auth-form input[type="email"],
.auth-form input[type="password"] {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    padding: 12px 14px;
    border-radius: 12px;
    outline: none;
    font-size: 15px;
    transition:
        border 0.25s,
        background 0.25s,
        box-shadow 0.25s;
}

.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus {
    border-color: #ffd861;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.form-footer {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.btn-auth {
    padding: 12px 26px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #05202a;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition:
        transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1),
        box-shadow 0.3s;
}
.btn-auth:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px -10px rgba(0, 0, 0, 0.55);
}
.btn-auth:active {
    transform: translateY(0) scale(0.98);
}

/* Guest pages (no navbar) */
body.guest .page-content {
    padding-top: 60px; /* slightly less top padding since no fixed navbar */
}
body.guest .auth-wrapper {
    min-height: calc(100vh - 80px);
}
