:root {
    --primary-color: #2196F3;
    --secondary-color: #757575;
    --background-color: #f5f5f5;
    --text-color: #212121;
    --error-color: #f44336;
    --success-color: #4CAF50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    max-width: 100vw;
    min-height: 100vh;
    background: #f0f2f5;
    position: fixed;
    overflow: hidden;
}

.screen {
    display: none;
    height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #f0f2f5;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
}

.screen.active {
    display: block;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    
}

h1 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 24px;
    text-align: center;
}

.input-field {
    position: relative;
    margin-bottom: 24px;
}

input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
    font-size: 16px;
    background: white;
}

label {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    transition: 0.2s ease all;
    pointer-events: none;
}

input:focus + label,
input:valid + label {
    top: 0;
    font-size: 12px;
    background: white;
    padding: 0 4px;
    left: 12px;
}

.btn-primary,
.btn-secondary {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

/* Splash Screen */
.logo-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

/* OTP Input */
.otp-input-container {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    justify-content: center;
}

.otp-input {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 24px;
}

/* Scanner */
.scanner-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

#camera-scanner-page #scanner-container {
    width: 100%;
    min-height: calc(100vh - 60px);
    background: black;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 24px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
}

/* Image Zoom Modal Styles */
.modal-content.image-zoom-content {
    background-color: transparent;
    padding: 0;
    max-width: 90%;
    width: auto;
    position: relative;
}

.close-zoom-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.close-zoom-btn .material-icons {
    font-size: 32px;
}

#zoomed-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

/* Make asset images clickable */
.image-container img {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.image-container img:hover {
    transform: scale(1.05);
}

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.modal-buttons button {
    flex: 1;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
}

.toast.success {
    background-color: var(--success-color);
}

.toast.error {
    background-color: var(--error-color);
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* QR Result */
.qr-result {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.qr-result h2 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--secondary-color);
}

#qr-data {
    word-break: break-all;
    font-family: monospace;
    background: var(--background-color);
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
}

/* Auth Pages Styling */
.auth-card {
    background: white;
    border-radius: 16px;
    padding: 32px 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 0 auto;
    margin-top: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
    position: relative;
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
}

.auth-subtitle {
    color: var(--secondary-color);
    margin-top: 8px;
    font-size: 14px;
}

.input-field {
    position: relative;
    margin-bottom: 24px;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
}

.input-field input {
    padding-left: 48px;
}

.input-field select {
    padding-left: 48px;
    background-color: white;
    cursor: pointer;
}

.input-field select option {
    padding: 8px;
}

/* OTP Input Styling */
.otp-input-container {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    justify-content: center;
}

.otp-input {
    width: 60px;
    height: 60px;
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    font-size: 24px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.otp-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.back-button {
    position: absolute;
    left: 0;
    top: 0;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--secondary-color);
}

.btn-text {
    background: none;
    border: none;
    color:#f8f9ff;
    font-weight: 500;
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.btn-text:hover {
    background-color: rgba(33, 150, 243, 0.1);
}

/* App Header */
.app-header {
    background: white;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
}

.app-header h1 {
    margin: 0;
    font-size: 20px;
    text-align: left;
}

.header-title {
    flex: 1;
    text-align: left;
}

.header-title .user-email {
    font-size: 12px;
    color: var(--secondary-color);
    margin-top: 2px;
}

/* Special styling for QR scanner page header */
#qr-scanner-page .header-title {
    text-align: left;
    padding-left: 8px;
}

.app-header .back-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--secondary-color);
}

.header-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--secondary-color);
    border-radius: 50%;
}

.icon-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Welcome Card */
.welcome-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.welcome-text h2 {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--text-color);
}

.welcome-text p {
    color: var(--secondary-color);
    font-size: 14px;
}

.welcome-image {
    width: 120px;
    height: 90px;
}

/* Dashboard/Scanner Page */
.dashboard {
    padding: 20px;
    height: calc(100vh - 60px);
    overflow-y: auto;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-card .material-icons {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

#parent-details .material-icons {
    color: #4CAF50;  /* Green color for parent details icon */
}

.action-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: #333;
}

.action-card .action-desc {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

@media (max-width: 600px) {
    .quick-actions {
        grid-template-columns: 1fr 1fr;
    }
    
    #parent-details {
        grid-column: span 2;  /* Make parent details card full width on mobile */
    }
}

.scanner-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Status Bar (Mobile feel) */
.status-bar {
    background: var(--primary-color);
    padding: 4px 16px;
    color: white;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
}

/* Recent Scans */
.recent-scans {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.recent-scans h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-color);
}

.scan-item {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.scan-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.scan-item .material-icons {
    color: var(--success-color);
}

.scan-info h4 {
    font-size: 16px;
    margin: 0;
    color: var(--text-color);
    margin-bottom: 8px;
}

.scan-info p {
    font-size: 12px;
    color: var(--secondary-color);
    margin: 4px 0 0;
}

.scan-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.scan-details p {
    font-size: 12px;
    color: var(--secondary-color);
    margin: 0;
}

.scan-details strong {
    color: var(--text-color);
}

.scan-comment {
    background: var(--background-color);
    padding: 8px;
    border-radius: 4px;
    margin-top: 8px !important;
    font-style: italic;
    color: var(--text-color) !important;
}

.scan-images {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.scan-images img {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.scan-images img:hover {
    transform: scale(1.1);
}

.more-images {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.scan-documents {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.document-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--background-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 12px;
    transition: background-color 0.2s ease;
}

.document-link:hover {
    background-color: rgba(33, 150, 243, 0.1);
}

.document-link .material-icons {
    font-size: 16px;
}

/* Asset Details Styling */
#asset-details {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.asset-info {
    margin-bottom: 20px;
}

.asset-info h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.asset-name {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.asset-desc {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.asset-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.asset-property {
    display: flex;
    flex-direction: column;
}

.property-label {
    font-weight: 500;
    color: var(--secondary-color);
}

.property-value {
    font-weight: 400;
}

.asset-images, .asset-documents {
    margin-top: 20px;
}

.asset-images h4, .asset-documents h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.image-container {
    position: relative;
}

.image-container img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #eee;
}

.image-desc {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-top: 5px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documents-list {
    list-style: none;
    padding: 0;
}

.documents-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.documents-list a {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.documents-list a:hover {
    text-decoration: underline;
}

.document-desc {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.verification-comment-container {
    margin-top: 20px;
}

.verification-comment-container label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

#verification-comment {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    resize: vertical;
}

/* Make sure the verification page displays asset details properly */
#verification-page #asset-details {
    display: block !important;
    margin-top: 20px;
}

/* Ensure images don't overflow */
.image-container img {
    max-width: 100%;
    height: auto;
    max-height: 150px;
}

/* Make sure the verify button is visible */
#verification-page #verify-button {
    display: block;
    margin: 20px auto;
    width: 100%;
    max-width: 300px;
}

/* Image Gallery */
.asset-images {
    margin: 24px 0;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.image-thumbnail {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
    border: 2px solid transparent;
}

.image-thumbnail:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
}

.image-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.image-thumbnail:hover img {
    transform: scale(1.1);
}

/* Document List */
.asset-documents {
    margin: 24px 0;
}

.document-list {
    margin-top: 12px;
}

.document-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--background-color);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
}

.document-item .material-icons {
    color: var(--primary-color);
}

/* Comments Section */
.comments-section {
    margin: 24px 0;
}

.comments-section h3 {
    margin-bottom: 12px;
    font-size: 16px;
    color: var(--text-color);
}

#verification-comments {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

#verification-comments:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

/* Scanner View */
.scanner-view {
    position: relative;
    width: 100%;
    height: calc(100vh - 60px);
    overflow: hidden;
    background: #000;
}

#scanner-container {
    width: 100%;
    height: 100%;
    position: relative;
}

#qr-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.scan-region {
    width: 250px;
    height: 250px;
    border: 2px solid #fff;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 0 0 5000px rgba(0, 0, 0, 0.5);
}

.scan-region::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 40px;
    height: 40px;
    border-top: 4px solid var(--primary-color);
    border-left: 4px solid var(--primary-color);
    border-top-left-radius: 10px;
}

.scan-region::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 40px;
    height: 40px;
    border-top: 4px solid var(--primary-color);
    border-right: 4px solid var(--primary-color);
    border-top-right-radius: 10px;
}

.scan-region::before,
.scan-region::after {
    animation: scan-animation 2s infinite;
}

@keyframes scan-animation {
    0% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.5;
    }
}

.scan-hint {
    color: #fff;
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Recent Scans Styling */
.scan-list {
    margin-top: 12px;
}

.scan-item {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.scan-item .material-icons {
    color: var(--success-color);
    font-size: 24px;
}

.scan-info {
    flex: 1;
}

.scan-info h4 {
    font-size: 16px;
    margin: 0;
    color: var(--text-color);
}

.scan-info p {
    font-size: 12px;
    color: var(--secondary-color);
    margin: 4px 0 0;
}

.scan-comment {
    background: var(--background-color);
    padding: 8px;
    border-radius: 4px;
    margin-top: 8px !important;
    font-style: italic;
}

.location-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 12px;
}

.location-link .material-icons {
    font-size: 14px;
    color: var(--primary-color);
}

.location-link:hover {
    text-decoration: underline;
}

.no-scans {
    text-align: center;
    padding: 24px;
    color: var(--secondary-color);
    background: white;
    border-radius: 8px;
    margin: 12px 0;
}

.no-scans .material-icons {
    font-size: 48px;
    margin-bottom: 8px;
    color: var(--primary-color);
    opacity: 0.5;
}

.no-scans-subtitle {
    font-size: 12px;
    color: var(--secondary-color);
    margin-top: 4px;
}

/* Payment History Specific Styles */
.payment-particular {
    color: var(--text-color) !important;
    font-size: 13px !important;
    line-height: 1.4;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.payment-id {
    color: var(--secondary-color) !important;
    font-family: 'Courier New', monospace;
}

.scan-item[data-payment="true"] .material-icons {
    color: var(--success-color);
    background: rgba(76, 175, 80, 0.1);
    border-radius: 50%;
    padding: 4px;
}

.payment-amount {
    color: var(--success-color) !important;
    font-weight: bold !important;
    font-size: 14px !important;
}

/* Responsive grid for payment details */
@media (max-width: 480px) {
    .scan-details {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    
    .payment-particular {
        -webkit-line-clamp: 3;
    }
}

/* Loader Styles */
.app-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.app-loader.active {
    opacity: 1;
    visibility: visible;
}

.loader-container {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.loader-container p {
    margin-top: 15px;
    color: var(--text-color);
    font-weight: 500;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Verification History Styles */
#verification-history {
    margin-top: 20px;
}

.verification-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.verification-item {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.verification-header {
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.verification-header h3 {
    font-size: 18px;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.verification-header .asset-name {
    font-size: 14px;
    color: var(--secondary-color);
    margin: 0;
}

.verification-details {
    font-size: 14px;
}

.verification-details p {
    margin-bottom: 8px;
}

.verification-date, 
.verification-location, 
.verification-remarks, 
.verification-comment {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
}

.verification-comment {
    background: #f9f9f9;
    padding: 8px;
    border-radius: 4px;
    font-style: italic;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary-color);
    font-size: 16px;
}

/* Verification Modal Styles */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    position: static;
    transform: none;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-color);
}

#verification-modal-comment {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
}

/* Result Container Styles */
#result-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#asset-details {
    margin-bottom: 20px;
}

.asset-info {
    margin-bottom: 20px;
}

.asset-info h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.asset-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.asset-desc {
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 16px;
}

.asset-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.asset-property {
    display: flex;
    flex-direction: column;
}

.property-label {
    font-size: 12px;
    color: var(--secondary-color);
    margin-bottom: 4px;
}

.property-value {
    font-size: 14px;
    font-weight: 500;
}

.asset-images, .asset-documents {
    margin-top: 24px;
}

.asset-images h4, .asset-documents h4 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text-color);
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.image-container {
    position: relative;
}

.image-container img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
}

.image-desc {
    font-size: 12px;
    color: var(--secondary-color);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.documents-list {
    list-style: none;
    padding: 0;
}

.documents-list li {
    margin-bottom: 8px;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 4px;
}

.documents-list a {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.documents-list a:hover {
    text-decoration: underline;
}

.document-desc {
    font-size: 12px;
    color: var(--secondary-color);
}

.verification-comment-container {
    margin-top: 24px;
}

.verification-comment-container label {
    display: block;
    position: static;
    transform: none;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-color);
}

#verification-comment {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
}

/* Dashboard Loading Indicator */
.scan-list .loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 100%;
}

.scan-list .loading-indicator .loading-spinner {
    width: 30px;
    height: 30px;
    margin-bottom: 10px;
}

.scan-list #error-message {
    text-align: center;
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
    background-color: rgba(244, 67, 54, 0.1);
}

/* Dashboard Scan Details */
.scan-list .scan-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.scan-list .scan-details p {
    font-size: 12px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scan-list .location-link {
    max-width: 200px;
    white-space: normal;
    /*overflow: hidden;*/
    text-overflow: ellipsis;
}

/* Toast notifications */
#toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 400px;
}

.toast {
    background-color: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    width: 100%;
    animation: toast-fade-in 0.3s ease-in-out;
}

.toast-icon {
    margin-right: 10px;
}

.toast-success {
    background-color: #4CAF50;
}

.toast-error {
    background-color: #F44336;
}

.toast-warning {
    background-color: #FF9800;
}

.toast-info {
    background-color: #2196F3;
}

.toast-fade-out {
    animation: toast-fade-out 0.3s ease-in-out forwards;
}

@keyframes toast-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toast-fade-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Verification Page Styles */
#verification-page .dashboard {
    padding: 15px;
    max-width: 100%;
    overflow-x: hidden;
}

#asset-details {
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    max-width: 100%;
    overflow: hidden;
    display: block;
}

/* Make sure images don't overflow */
.image-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Ensure verify button is properly styled */
#verification-page #verify-button {
    margin-top: 15px;
    margin-bottom: 20px;
    width: 100%;
    display: block;
}

/* Verify Button Styling */
#verify-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 20px auto;
    max-width: 200px;
}

#verify-button .material-icons {
    margin-right: 4px;
}

/* Ensure buttons have proper alignment */
.btn-primary,
.btn-secondary {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

/* Section header with refresh button */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.refresh-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    padding: 4px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.refresh-btn:hover {
    background-color: rgba(33, 150, 243, 0.1);
}

.refresh-btn .material-icons {
    font-size: 20px;
}

/* Recent scans section */
.recent-scans {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Company Code Modal */
#company-code-modal.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

#company-code-modal.modal.active {
    display: flex;
    animation: modalFadeIn 0.3s ease-out;
}

#company-code-modal .modal-content {
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#company-code-modal .lock-icon {
    background: var(--primary-color);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#company-code-modal .lock-icon .material-icons {
    font-size: 40px;
    color: white;
}

#company-code-modal h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.75rem;
    font-weight: 600;
}

#company-code-modal p {
    margin-bottom: 2rem;
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

#company-code-modal .form-group {
    margin-bottom: 1.5rem;
}

#company-code-modal .input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

#company-code-modal .input-with-icon .material-icons {
    position: absolute;
    left: 12px;
    color: #666;
    font-size: 20px;
}

#company-code-modal input {
    width: 100%;
    padding: 1rem 1rem 1rem 45px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

#company-code-modal input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
    outline: none;
}

#company-code-modal button {
    width: 100%;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

#company-code-modal button:hover {
    transform: translateY(-1px);
}

#company-code-modal button .material-icons {
    font-size: 20px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Add a subtle bounce animation to the lock icon */
#company-code-modal .lock-icon {
    animation: lockBounce 1s ease-out;
}

@keyframes lockBounce {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    50% {
        transform: translateY(10px);
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Parent Details Card */
.parent-details-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-top: 20px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.parent-details-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.parent-details-card:active {
    transform: translateY(0);
}

#parent-details-page {
    background: #f5f5f5;
}

#parent-details-page .app-header {
    background: var(--primary-color);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#parent-details-page .header-title {
    margin-left: 16px;
}

#backToMain {
    background: none;
    border: none;
    color: white;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

#backToMain:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.parent-details-card h2 {
    color: var(--text-color);
    margin-bottom: 12px;
    font-size: 1.5rem;
}

.parent-details-card p {
    color: var(--secondary-color);
    margin-bottom: 24px;
}

/* Search Categories */
.search-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.category-card {
    background: white;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.category-card:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.category-card .material-icons {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: block;
}

.category-card h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 4px;
}

.category-card p {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin: 0;
    line-height: 1.3;
}

/* No results styling */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary-color);
}

.no-results .material-icons {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--secondary-color);
}

.no-results h3 {
    margin-bottom: 8px;
    color: var(--text-color);
}

.no-results p {
    margin: 0;
}

/* Enhanced Popup Styles */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.popup.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.popup-content {
    background: white;
    width: 100%;
    max-width: 480px;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.popup-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.popup-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    z-index: 1;
    position: relative;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.popup-header h2::before {
    content: 'group';
    font-family: 'Material Icons';
    font-size: 24px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.close-btn:active {
    transform: scale(0.95);
}

.close-btn .material-icons {
    font-size: 20px;
}

/* Enhanced Form Styles */
#search-form {
    padding: 32px 24px 24px;
}

.input-field {
    position: relative;
    margin-bottom: 24px;
}

.input-field .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    z-index: 2;
    font-size: 20px;
}

.input-field input,
.input-field select {
    width: 100%;
    padding: 16px 16px 16px 52px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.input-field input:focus,
.input-field select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    transform: translateY(-1px);
}

.input-field select {
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23757575"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}

.input-field select option {
    padding: 12px;
    font-size: 16px;
}

/* Enhanced Button Styles */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1976D2 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::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-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(33, 150, 243, 0.4);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

/* Mobile Responsive Enhancements */
@media (max-width: 480px) {
    .popup-content {
        width: 95%;
        margin: 10px;
        border-radius: 16px;
    }
    
    .popup-header {
        padding: 20px 16px;
    }
    
    .popup-header h2 {
        font-size: 1.2rem;
    }
    
    #search-form {
        padding: 24px 16px 20px;
    }
    
    .input-field input,
    .input-field select {
        padding: 14px 14px 14px 48px;
        font-size: 16px;
    }
    
    .btn-primary {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* Loading State for Form */
.btn-primary.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Success/Error States */
.input-field.success input,
.input-field.success select {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.input-field.error input,
.input-field.error select {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

/* Enhanced Select Dropdown */
.input-field select:hover {
    border-color: var(--primary-color);
}

.input-field select option:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Enhanced Student List Styles - Professional Design */
.students-container {
    padding: 0;
    max-height: 70vh;
    overflow-y: auto;
    background: #f8fafc;
}

.students-container::-webkit-scrollbar {
    width: 6px;
}

.students-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.students-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.students-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    margin: 0;
    border: none;
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.results-count {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: white;
    font-size: 1rem;
}

.results-count .material-icons {
    font-size: 22px;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px;
    border-radius: 8px;
}

.student-card-enhanced {
    background: white;
    margin: 0 16px 16px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    animation: slideInUp 0.4s ease-out both;
    position: relative;
}

.student-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #3b82f6, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.student-card-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.student-card-enhanced:hover::before {
    opacity: 1;
}

.student-card-header {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #fafbfc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

.student-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    position: relative;
    overflow: hidden;
}

.student-avatar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.student-card-enhanced:hover .student-avatar::before {
    animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

.student-avatar .material-icons {
    color: white;
    font-size: 28px;
    z-index: 1;
    position: relative;
}

.student-basic-info {
    flex: 1;
    min-width: 0;
}

.student-name {
    margin: 0 0 6px 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.student-code {
    margin: 0;
    font-size: 0.82rem;
    color: #64748b;
    font-family: 'SF Mono', 'Consolas', 'Liberation Mono', monospace;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

.student-class-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.class-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    min-width: 70px;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    letter-spacing: 0.025em;
}

.section-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
    letter-spacing: 0.025em;
}

.student-card-body {
    padding: 20px 24px;
    background: white;
}

.student-detail-row {
    display: flex;
    align-items: center;
   
   
    border-radius: 8px;
    transition: all 0.2s ease;
}

.student-detail-row:last-child {
    margin-bottom: 0;
}

.student-detail-row:hover {
    background: #f8fafc;
    transform: translateX(4px);
}

.detail-icon {
    color: var(--primary-color);
    font-size: 20px;
    margin-right: 14px;
    width: 24px;
    /* background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); */
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-label {
    font-weight: 600;
    color: #475569;
    margin-right: 10px;
    min-width: 70px;
    font-size: 0.88rem;
    letter-spacing: 0.025em;
}

.detail-value {
    color: #1e293b;
    font-weight: 500;
    flex: 1;
    font-size: 0.92rem;
}

.student-card-footer {
    padding: 16px 24px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid #e2e8f0;
}

.view-details-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.92rem;
    letter-spacing: 0.025em;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    position: relative;
    overflow: hidden;
}

.view-details-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 ease;
}

.view-details-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
}

.view-details-btn:hover::before {
    left: 100%;
}

.view-details-btn:active {
    transform: translateY(-1px);
}

.view-details-btn .material-icons {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.view-details-btn:hover .material-icons {
    transform: scale(1.1);
}

/* Search Loading Styles */
.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    margin: 0 16px;
    border-radius: 12px;
}

.search-loading .loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
}

.search-loading p {
    color: #64748b;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 500;
}

/* Empty State Styles */
.no-students-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    margin: 0 16px;
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
}

.no-students-found .material-icons {
    font-size: 64px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.no-students-found h3 {
    color: #475569;
    font-size: 1.2rem;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.no-students-found p {
    color: #64748b;
    margin: 0;
    font-size: 1rem;
}

/* Animation for student cards */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Professional Badge Variations */
.class-badge.primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.class-badge.secondary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.class-badge.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.class-badge.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

/* Mobile Responsiveness Improvements */
@media (max-width: 768px) {
    .popup-content {
        max-width: 95vw;
        margin: 10px;
        border-radius: 12px;
    }

    .popup-header {
        padding: 20px 20px;
    }

    .popup-header h2 {
        font-size: 1.3rem;
    }

    .popup-header h2::before {
        font-size: 20px;
        padding: 6px;
    }

    .students-container {
        max-height: 60vh;
    }

    .search-results-header {
        padding: 16px 20px;
    }

    .student-card-enhanced {
        margin: 0 12px 12px 12px;
        border-radius: 10px;
    }

    .student-card-header {
        padding: 16px 20px;
        flex-wrap: wrap;
       
    }

    .student-avatar {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        margin-right: 12px;
    }

    .student-avatar .material-icons {
        font-size: 24px;
    }

    .student-name {
        font-size: 1.1rem;
    }

    .student-code {
        font-size: 0.8rem;
        padding: 3px 8px;
    }

    .student-class-info {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        margin-top: 8px;
    }

    .class-badge {
        font-size: 0.75rem;
        padding: 5px 12px;
        min-width: 60px;
    }

    .section-badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    .student-card-body {
        padding: 16px 20px;
    }

    

    .detail-icon {
        font-size: 18px;
        padding: 6px;
    }

    .detail-label {
        min-width: 60px;
        font-size: 0.85rem;
    }

    .detail-value {
        font-size: 0.9rem;
    }

    .student-card-footer {
        padding: 12px 20px 16px;
    }

    .view-details-btn {
        padding: 7px 10px;
        font-size: 0.9rem;
    }

    .results-count {
        font-size: 0.95rem;
    }

    .results-count .material-icons {
        font-size: 20px;
        padding: 5px;
    }
}

/* Toast Styles */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    max-width: 90%;
    animation: slideUp 0.3s ease-out;
}

.toast-success {
    background: var(--success-color);
}

.toast-error {
    background: var(--error-color);
}

.toast-icon {
    font-size: 20px;
}

.toast-fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .student-card-header {
        padding: 16px;
        flex-wrap: wrap;
    }
    
    .student-avatar {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }
    
    .student-avatar .material-icons {
        font-size: 20px;
    }
    
    .student-name {
        font-size: 1rem;
    }
    
    .student-class-info {
        margin-top: 8px;
        flex-direction: row;
        gap: 8px;
        width: 100%;
        justify-content: flex-start;
    }
    
    .student-card-body {
        padding: 12px 16px;
    }
    
    .detail-label {
        min-width: 50px;
        font-size: 0.8rem;
    }
    
    .student-card-footer {
        padding: 4px 1px;
    }
}




.student-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.student-card:hover {
    transform: translateY(-2px);
}

/* Profile Page Styles */
.profile-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.profile-header {
    background: linear-gradient(135deg, var(--primary-color), #1976D2);
    padding: 32px 20px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 60px;
    margin: 0 auto 16px;
    overflow: hidden;
    border: 4px solid #fff;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.online-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: #4CAF50;
    border-radius: 50%;
    border: 3px solid #fff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

.profile-info {
    text-align: center;
}

.profile-info h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.profile-info p {
    margin: 8px 0 4px;
    opacity: 0.9;
    font-size: 1rem;
}

.student-id {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    margin-top: 8px;
}

.profile-details {
    padding: 0px 10px;
}

.details-grid {
    display: grid;
    gap: 16px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.detail-item:hover {
    background: #e3f2fd;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.detail-item .label {
    color: var(--secondary-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.detail-item .label .material-icons {
    font-size: 18px;
    opacity: 0.7;
}

.detail-item .value {
    font-weight: 600;
    color: var(--text-color);
    text-align: right;
}

.fees-section {
    padding: 24px 20px;
    background: linear-gradient(135deg, #f8f9fa, #e8f4f8);
    border-top: 1px solid #eee;
}

.fees-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.fees-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.fees-status {
    display: flex;
    gap: 8px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pending {
    background: #ffebee;
    color: #c62828;
}

.status-badge.paid {
    background: #e8f5e8;
    color: #2e7d32;
}

.pending-dues-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.pending-dues-card.clickable {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.pending-dues-card.clickable:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.pending-dues-card.clickable::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.pending-dues-card.clickable:hover::before {
    left: 100%;
}

.dues-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.dues-amount {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.dues-amount .currency {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--error-color);
}

.dues-amount .amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--error-color);
}

.dues-info {
    flex: 1;
}

.dues-info .dues-label {
    display: block;
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 4px;
}

.dues-count {
    font-size: 0.85rem;
    color: var(--secondary-color);
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 12px;
}

.dues-action {
    display: flex;
    align-items: center;
    color: var(--primary-color);
}

.dues-action .material-icons {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.pending-dues-card.clickable:hover .dues-action .material-icons {
    transform: translateX(4px);
}

.dues-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.due-month-chip {
    background: #fff3e0;
    color: #e65100;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #ffcc02;
    transition: all 0.3s ease;
}

.due-month-chip:hover {
    background: #ffe0b2;
    transform: translateY(-1px);
}

.click-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border-radius: 12px;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 12px;
    opacity: 0.8;
}

.click-hint .material-icons {
    font-size: 18px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-4px); }
    60% { transform: translateY(-2px); }
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Payment Action Section */
.payment-action-section {
    padding: 20px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    margin-top: 0;
}

.payment-action-btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color), #1976D2);
    border: none;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.3);
}

.payment-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.4);
    background: linear-gradient(135deg, #1565C0, #0D47A1);
}

.payment-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.3);
}

.payment-action-btn .material-icons {
    font-size: 24px;
}

/* Payment Page Styles */
.student-summary-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    color: var(--text-color);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 12px 40px rgba(33, 150, 243, 0.08);
    border: 1px solid rgba(33, 150, 243, 0.08);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.student-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 60px rgba(33, 150, 243, 0.15);
}

.student-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #3b82f6, #1976d2, #3f51b5);
    border-radius: 24px 24px 0 0;
}

.student-summary-info {
    display: flex;
    align-items: center;
    gap: 24px;
}

.student-avatar {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    overflow: hidden;
    border: 4px solid rgba(33, 150, 243, 0.1);
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    margin-left: 120px;
}

.student-summary-card:hover .student-avatar {
    transform: scale(1.05);
    border-color: rgba(33, 150, 243, 0.2);
}

.student-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-basic-details h3 {
    margin: 0 0 8px 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.025em;
}

.student-basic-details p {
    margin: 0 0 12px 0;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
}

.student-code {
    background: linear-gradient(135deg, #fff, #fff);
    color: white;
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(142, 36, 170, 0.2);
    display: inline-block;
}

.payment-summary {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid #e0e0e0;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.summary-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.selected-info {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.total-amount-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa, #e8f4f8);
    border-radius: 12px;
    border: 1px solid var(--primary-color);
}

.total-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
}

.total-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.due-months-container {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
    height: 30px;
}

.section-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Payment Period Selector */
.payment-period-selector {
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    border-radius: 16px;
    border: 1px solid #e3f2fd;
}

.payment-period-selector h4 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.period-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.period-option {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.period-option:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(51, 153, 204, 0.15);
    transform: translateY(-2px);
}

.period-option.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    box-shadow: 0 4px 16px rgba(51, 153, 204, 0.2);
}

.period-option.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary-color), #f7f7f7);
    border-radius: 14px;
    z-index: -1;
}

.period-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), #2196f3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.period-option:hover .period-icon,
.period-option.active .period-icon {
    background: linear-gradient(135deg, #1976d2, #9c27b0);
    transform: scale(1.1);
}

.period-icon .material-icons {
    color: #fff;
    font-size: 24px;
}

.period-info h5 {
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}

.period-info p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.3;
}

.period-option.active .period-info h5 {
    color: var(--primary-color);
}

.period-option.active .period-info p {
    color: #666;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .period-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .period-option {
        padding: 12px 8px;
    }
    
    .period-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 8px;
    }
    
    .period-icon .material-icons {
        font-size: 20px;
    }
    
    .period-info h5 {
        font-size: 0.85rem;
    }
    
    .period-info p {
        font-size: 0.7rem;
    }
}

.select-options {
    display: flex;
    gap: 12px;
}

.due-months-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.due-month-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.due-month-item:hover {
    background: #e3f2fd;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.due-month-item.selected {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.2);
}

/* Group styling for period-based selection */
.due-month-item.group-first {
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    margin-bottom: 2px;
    position: relative;
}

.due-month-item.group-middle {
    border-radius: 4px;
    margin-bottom: 2px;
}

.due-month-item.group-last {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    margin-bottom: 12px;
    position: relative;
}

.due-month-item.group-last::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), #9c27b0);
    border-radius: 1px;
    opacity: 0.6;
}

/* Group indicators for quarterly, half-yearly, yearly */
.period-quarterly .due-month-item:nth-child(3n+1) {
    border-left: 4px solid #4caf50;
}

.period-quarterly .due-month-item:nth-child(3n+2) {
    border-left: 4px solid #4caf50;
}

.period-quarterly .due-month-item:nth-child(3n) {
    border-left: 4px solid #4caf50;
    margin-bottom: 16px;
}

.period-halfyearly .due-month-item:nth-child(6n+1),
.period-halfyearly .due-month-item:nth-child(6n+2),
.period-halfyearly .due-month-item:nth-child(6n+3),
.period-halfyearly .due-month-item:nth-child(6n+4),
.period-halfyearly .due-month-item:nth-child(6n+5),
.period-halfyearly .due-month-item:nth-child(6n) {
    border-left: 4px solid #ff9800;
}

.period-halfyearly .due-month-item:nth-child(6n) {
    margin-bottom: 16px;
}

.period-yearly .due-month-item {
    border-left: 4px solid #e91e63;
}

/* Admission and other fee styling */
.admission-other-fee {
    background: linear-gradient(135deg, #fff8e1 0%, #fff3c4 100%) !important;
    border-left: 4px solid #ffa726 !important;
    border-radius: 12px;
    margin-bottom: 8px;
}

.admission-other-fee .month-details h4::before {
    content: '🎓 ';
    margin-right: 6px;
    font-size: 1.1em;
}

.admission-other-fee:hover {
    background: linear-gradient(135deg, #fff3c4 0%, #ffecb3 100%) !important;
    border-left-color: #ff9800 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 152, 0, 0.15);
}

.admission-other-fee.selected {
    background: linear-gradient(135deg, #ffecb3 0%, #ffe082 100%) !important;
    border-left-color: #ff9800 !important;
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.25);
}

/* Remove old non-monthly fee styling */
.non-monthly-fee {
    background: #fff3e0 !important;
    border-left: 4px solid #ff9800 !important;
}

.non-monthly-fee .month-details h4::before {
    content: '📄 ';
    margin-right: 4px;
}

/* Update disabled state - only for non-selectable items (not used anymore) */
.disabled-for-period {
    opacity: 0.5 !important;
    pointer-events: none !important;
    background: #f5f5f5 !important;
    border-color: #e0e0e0 !important;
}

.disabled-for-period .month-details h4 {
    color: #999 !important;
}

.disabled-for-period .month-details p {
    color: #bbb !important;
}

.disabled-for-period .due-month-amount {
    color: #999 !important;
}

/* Remove the restriction messages since admission/other fees are now always selectable */
.period-quarterly .admission-other-fee::after,
.period-halfyearly .admission-other-fee::after,
.period-yearly .admission-other-fee::after {
    display: none;
}

/* Fees section divider */
.fees-section-divider {
    display: flex;
    align-items: center;
    margin: 24px 0 16px 0;
    gap: 12px;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
}

.divider-text {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
}

.divider-text .material-icons {
    font-size: 18px;
    color: var(--primary-color);
}

/* Group selection visual feedback */
.group-selection-hint {
    position: absolute;
    top: -8px;
    right: 8px;
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.due-month-item:hover .group-selection-hint {
    opacity: 1;
}

.due-month-item.selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    
    border-radius: 0 2px 2px 0;
}

.due-month-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.month-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.month-checkbox.checked {
    background: var(--primary-color);
    transform: scale(1.1);
}

.month-checkbox.checked::after {
    content: '✓';
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.month-details h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.month-year {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin: 0;
}

.due-month-amount {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.payment-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 20px;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    margin: 0 -20px -20px -20px;
}

.payment-actions .btn-primary {
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 56px;
    line-height: 1.3;
}

.payment-actions .btn-primary .material-icons {
    font-size: 20px;
}

.payment-actions .btn-primary:disabled {
    background: #e0e0e0;
    color: #9e9e9e;
    cursor: not-allowed;
    transform: none;
}

.payment-actions .btn-primary:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.3);
}

/* Enhanced button styling for amount display */
.payment-actions .btn-primary:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-color), #1976d2);
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.2);
}

.payment-actions .btn-primary:not(:disabled):active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.loading-indicator {
    display: none;
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary-color);
}

.loading-indicator.active {
    display: block;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error State Styles */
.error-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--secondary-color);
}

.error-icon {
    margin-bottom: 20px;
}

.error-icon .material-icons {
    font-size: 64px;
    color: var(--error-color);
    opacity: 0.7;
}

.error-state h3 {
    margin: 0 0 12px 0;
    font-size: 1.3rem;
    color: var(--text-color);
}

.error-state p {
    margin: 0 0 24px 0;
    font-size: 1rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.error-state .btn-primary {
    margin-top: 16px;
}

/* Enhanced Due Details Popup Styles */
.large-popup .popup-content {
    max-width: 600px;
    max-height: 90vh;
}

.due-summary-header {
    background: linear-gradient(135deg, var(--primary-color), #1976D2);
    color: #fff;
    padding: 24px;
    margin: -24px -24px 24px -24px;
    border-radius: 0;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.summary-amount {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.summary-amount .currency {
    font-size: 1.4rem;
    font-weight: 600;
}

.summary-amount span:last-child {
    font-size: 2.5rem;
    font-weight: 700;
}

.summary-info h4 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.summary-info p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.due-details-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 24px;
}

.due-month-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.due-month-item:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.due-month-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.month-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

.month-checkbox.checked {
    background: var(--primary-color);
}

.month-checkbox.checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.month-details h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.month-year {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.due-month-amount {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.popup-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .popup-actions {
        grid-template-columns: 1fr;
    }
    
    .dues-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .summary-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .details-grid {
        gap: 12px;
    }
    
    .detail-item {
        padding: 12px;
    }
    
    /* Payment page mobile styles */
    .student-summary-info {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .select-options {
        flex-direction: column;
        gap: 8px;
    }
    
    .due-month-item {
        padding: 12px;
    }
    
    .due-month-info {
        gap: 12px;
    }
    
    .total-amount-display {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .payment-actions {
        margin: 0 -16px -16px -16px;
        padding: 16px;
    }
    
    .click-hint {
        padding: 8px;
        font-size: 0.8rem;
    }
    
    .dues-breakdown {
        gap: 6px;
    }
    
    .due-month-chip {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
    
    /* Payment action button mobile */
    .payment-action-btn {
        padding: 14px 20px;
        font-size: 1rem;
    }
}

/* Due Details Popup Styles */
.due-details-container {
    padding: 20px;
    max-height: 80vh;
    overflow-y: auto;
}

.due-category {
    margin-bottom: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.category-header {
    background: #f8f9fa;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.category-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.category-total {
    font-weight: 600;
    color: var(--primary-color);
}

.due-item {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.due-item:last-child {
    border-bottom: none;
}

.due-header {
    flex: 1;
}

.due-header h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
}

.due-date {
    margin: 0;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.due-amount {
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
    margin-left: 16px;
}

.dues-total-section {
    margin-top: 24px;
    padding: 20px;
    background: var(--primary-color);
    border-radius: 12px;
    color: #fff;
}

.dues-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dues-total h3 {
    margin: 0;
    font-size: 1.2rem;
}

.total-amount {
    font-size: 1.4rem;
    font-weight: 600;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Parent Details Card Button */
#open-mobile-popup {
    width: 100%;
    margin-top: 16px;
    padding: 12px 24px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#open-mobile-popup:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#open-mobile-popup:active {
    transform: translateY(0);
}

/* Make sure popup is on top */
.popup {
    z-index: 10000;
}

/* Payment Details Page Styles */
#payment-details-page {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
}

.payment-details-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.payment-details-header .header-content {
    flex: 1;
}

.payment-details-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-color);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #1976d2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-top: 4px;
    font-weight: 500;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border: none;
    
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--primary-color);
}

.icon-btn:hover {
    background: var(--primary-color);
    color: #fff;
    transform: scale(1.05);
}

.back-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(33, 150, 243, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--primary-color);
}

.back-btn:hover {
    background: var(--primary-color);
    color: #fff;
    transform: scale(1.05);
}

.payment-details-content {
    padding: 0 20px 20px;
}

/* Card Headers */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(33, 150, 243, 0.1);
}

.card-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.card-header .material-icons {
    color: white;
    font-size: 1.3rem;
}

/* Student Summary Card */
.student-summary-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 12px 40px rgba(33, 150, 243, 0.08);
    border: 1px solid rgba(33, 150, 243, 0.08);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.student-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 60px rgba(33, 150, 243, 0.15);
}

.student-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #3b82f6, #1976d2, #3f51b5);
    border-radius: 24px 24px 0 0;
}

.student-summary-card .card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(33, 150, 243, 0.1);
}

.student-summary-card .card-header .material-icons {
    color: var(--primary-color);
    font-size: 1.4rem;
    background: rgba(33, 150, 243, 0.1);
    padding: 8px;
    border-radius: 12px;
}

.student-summary-card .card-header h3 {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.student-summary-header {
    display: flex;
    align-items: center;
    gap: 24px;
}

.student-avatar {
    position: relative;
    flex-shrink: 0;
    margin-left: 0;
}

.student-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    object-fit: cover;
    border: 4px solid rgba(33, 150, 243, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.student-summary-card:hover .student-avatar img {
    transform: scale(1.05);
    border-color: rgba(33, 150, 243, 0.2);
}

.avatar-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--success-color), #388e3c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.avatar-badge .material-icons {
    font-size: 16px;
    color: #fff;
}

.student-summary-info {
    flex: 1;
    min-width: 0;
    
}

.student-summary-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.4rem;
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.student-summary-info p {
    margin: 6px 0;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.student-summary-info p:first-of-type {
    color: var(--primary-color);
    font-weight: 600;
    background: rgba(33, 150, 243, 0.08);
    padding: 6px 12px;
    border-radius: 12px;
    display: inline-block;
    font-size: 0.9rem;
}

.student-summary-info p:last-of-type {
    color: #3b82f6;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    background: rgba(142, 36, 170, 0.08);
    padding: 6px 12px;
    border-radius: 12px;
    display: inline-block;
    font-size: 0.85rem;
    margin-top: 8px;
}

/* Additional student summary card enhancements */
.student-summary-card .card-header {
    animation: slideInDown 0.6s ease-out;
}

.student-summary-header {
    animation: slideInUp 0.6s ease-out 0.2s both;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design for student summary card */
@media (max-width: 768px) {
    .student-summary-card {
        padding: 24px 20px;
        border-radius: 20px;
        margin-bottom: 20px;
    }
    
    .student-summary-header {
        gap: 16px;
        flex-direction: column;
        text-align: center;
    }
    
    .student-avatar img {
        width: 70px;
        height: 70px;
        border-radius: 20px;
    }
    
    .avatar-badge {
        width: 24px;
        height: 24px;
        bottom: -2px;
        right: -2px;
        border: 2px solid #fff;
    }
    
    .avatar-badge .material-icons {
        font-size: 14px;
    }
    
    .student-summary-info h3 {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .student-summary-info p {
        font-size: 0.9rem;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .student-summary-card {
        padding: 20px 16px;
        border-radius: 16px;
    }
    
    .student-summary-card .card-header {
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    
    .student-summary-card .card-header h3 {
        font-size: 1rem;
    }
    
    .student-avatar img {
        width: 60px;
        height: 60px;
        border-radius: 16px;
        border-width: 3px;
    }
    
    .student-summary-info h3 {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }
    
    .student-summary-info p {
        font-size: 0.85rem;
        padding: 4px 10px;
        border-radius: 10px;
    }
    
    .student-summary-info p:last-of-type {
        font-size: 0.8rem;
        margin-top: 6px;
    }
}

/* Payment Summary Card */
.payment-summary-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(33, 150, 243, 0.12);
    border: 1px solid rgba(33, 150, 243, 0.1);
    position: relative;
    overflow: hidden;
}

.payment-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4caf50, #66bb6a, #81c784);
}

.receipt-number {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(33, 150, 243, 0.2));
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    border: 1px solid rgba(33, 150, 243, 0.2);
}

.fee-count {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.2));
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    color: var(--success-color);
    font-weight: 600;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

/* Payment Calculation Section */
.payment-calculation-section {
    margin-top: 24px;
}

.calculation-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.calculation-row:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(4px);
}

.calculation-row.gross-total {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(33, 150, 243, 0.15));
    border: 2px solid rgba(33, 150, 243, 0.2);
    font-weight: 600;
}

.calculation-row.discount-row {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 193, 7, 0.15));
    border: 2px solid rgba(255, 193, 7, 0.2);
}

.calculation-row.net-payable {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.2));
    border: 3px solid rgba(76, 175, 80, 0.3);
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 16px;
    padding: 20px;
}

.row-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--text-color);
}

.row-label .material-icons {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.row-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-color);
}

.net-payable .row-value {
    font-size: 1.3rem;
    color: var(--success-color);
}

.calculation-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(33, 150, 243, 0.3), transparent);
    margin: 20px 0;
    border-radius: 1px;
}

/* Discount Input */
.row-input {
    display: flex;
    align-items: center;
}

.discount-input-container {
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    padding: 8px 12px;
    min-width: 140px;
    transition: all 0.3s ease;
}

.discount-input-container:focus-within {
    border-color: #ffc107;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.currency-symbol {
    color: #666;
    font-weight: 600;
    margin-right: 4px;
}

#discount-input {
    border: none;
    outline: none;
    font-size: 1rem;
    font-weight: 600;
    background: transparent;
    width: 70px;
    text-align: center;
    color: var(--text-color);
}

#discount-input::placeholder {
    color: #ccc;
}

.apply-discount-btn {
    border: none;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.apply-discount-btn:hover {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    transform: scale(1.05);
}

.apply-discount-btn .material-icons {
    font-size: 16px;
}

/* Payment Method Selection */
.payment-method-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 2px solid rgba(33, 150, 243, 0.1);
}

.payment-method-section h4 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.payment-method {
    padding: 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.payment-method:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.payment-method.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(33, 150, 243, 0.05));
}

.payment-method .material-icons {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.method-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: #fff;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* Invoice Section */
.invoice-section {
    background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
   
    padding: 0px 32px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(33, 150, 243, 0.12);
    border: 1px solid rgba(33, 150, 243, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.invoice-section.expanded {
    padding: 10px;
}

.invoice-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4caf50, #66bb6a, #81c784);
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(33, 150, 243, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.invoice-header.clickable:hover {
    background: rgba(33, 150, 243, 0.05);
    border-radius: 12px;
    padding: 16px 20px 20px 20px;
    margin: -16px -20px 32px -20px;
}

/* Compact Header for Collapsed Mode */
.invoice-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(33, 150, 243, 0.1);
}

.invoice-header-compact:hover {
    background: rgba(33, 150, 243, 0.05);
    border-radius: 8px;
    padding: 16px 12px;
    margin: 0 -12px;
}

.invoice-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-direction: column;
    align-items: flex-start;
}

.invoice-title h3 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--text-color);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Compact Title for Single Line */
.invoice-title-compact {
    display: flex;
    align-items: center;
    gap: 12px;
}

.invoice-title-compact h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-color);
    font-weight: 600;
}

.invoice-title-compact .material-icons {
    color: var(--primary-color);
    font-size: 1.4rem;
}

.invoice-title .expand-hint {
    font-size: 0.85rem;
    color: #666;
    font-weight: 400;
    margin-top: 4px;
    opacity: 0.8;
}

.expand-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(33, 150, 243, 0.1);
    transition: all 0.3s ease;
}

.expand-toggle .material-icons {
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.expand-toggle:hover {
    background: rgba(33, 150, 243, 0.2);
    transform: scale(1.1);
}

/* Invoice Meta in Expanded Mode */
.invoice-meta-expanded {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(33, 150, 243, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.invoice-meta-expanded .invoice-number {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
}

.invoice-meta-expanded .invoice-date {
    font-weight: 500;
    color: #666;
    font-size: 0.9rem;
}

.invoice-details {
    transition: all 0.3s ease;
    overflow: hidden;
    margin-top: 16px;
}

.invoice-details.expanded {
    display: block !important;
}

.invoice-title .material-icons {
    font-size: 1.6rem;
    color: var(--primary-color);
}

.invoice-meta {
    text-align: right;
    font-size: 0.9rem;
    color: #666;
}

.invoice-number {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.invoice-date {
    font-weight: 500;
}

.invoice-table {
    width: 100%;
}

.invoice-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(33, 150, 243, 0.05));
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 8px;
    border: 1px solid rgba(33, 150, 243, 0.2);
}

.invoice-items {
    margin-bottom: 20px;
}

.invoice-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    align-items: center;
}

.invoice-item:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.1);
}

.item-description {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1rem;
}

.item-month {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    background: rgba(33, 150, 243, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    text-align: center;
}

.item-due-date {
    color: #666;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

.item-amount {
    font-weight: 700;
    color: var(--success-color);
    font-size: 1.1rem;
    text-align: right;
}

.invoice-summary {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(33, 150, 243, 0.1);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
}

.summary-row.total-row {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.1));
    border: 2px solid rgba(76, 175, 80, 0.2);
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 12px;
    color: var(--success-color);
}

/* Professional Payment Button */
.secure-payment-section {
    background: transparent;
    padding: 24px;
    margin: 24px 0;
    text-align: center;
}

.professional-pay-btn {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    padding: 18px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.3);
    position: relative;
    overflow: hidden;
}

.professional-pay-btn:hover {
    background: linear-gradient(135deg, #1976D2 0%, #0D47A1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.professional-pay-btn:active {
    transform: translateY(0);
    transition: all 0.1s ease;
}

.professional-pay-btn .material-icons {
    font-size: 1.3rem;
}

.professional-pay-btn .btn-text {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.professional-pay-btn .btn-amount {
    font-weight: 700;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 8px;
    margin-left: auto;
}

/* Remove Payment Method Section Styles */
.payment-method-section,
.payment-methods,
.payment-method,
.method-badge {
    display: none !important;
}

/* Update Payment Details Actions - Remove them since we have new secure payment */
.payment-details-actions {
    display: none !important;
}

/* Terms Section */
.terms-section {
    background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(33, 150, 243, 0.1);
}

.terms-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--text-color);
}

.terms-header .material-icons {
    color: var(--primary-color);
}

.terms-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.terms-content li {
    padding: 8px 0;
    color: #666;
    font-size: 0.9rem;
    position: relative;
    padding-left: 20px;
}

.terms-content li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Payment Actions */
.payment-details-actions {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 16px;
    padding: 24px;
    background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(33, 150, 243, 0.15);
    position: sticky;
    bottom: 20px;
    margin: 24px 0;
    border: 1px solid rgba(33, 150, 243, 0.1);
}

.payment-details-actions .btn-secondary {
    padding: 18px;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    color: var(--text-color);
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.payment-details-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #e0e0e0, #bdbdbd);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.payment-details-actions .btn-primary {
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #1976d2);
    border-radius: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.payment-details-actions .btn-primary:hover {
    background: linear-gradient(135deg, #1976d2, #0d47a1);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(33, 150, 243, 0.4);
}

.amount-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 8px;
}

/* Loading and Error States */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
    border-radius: 20px;
    margin: 20px;
    box-shadow: 0 8px 32px rgba(33, 150, 243, 0.12);
}

.loading-container.active {
    display: flex;
}

.loading-container p {
    margin-top: 20px;
    color: #666;
    font-size: 1.1rem;
    font-weight: 500;
}

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
    border-radius: 20px;
    margin: 20px;
    box-shadow: 0 8px 32px rgba(244, 67, 54, 0.12);
}

.error-icon {
    margin-bottom: 20px;
}

.error-icon .material-icons {
    font-size: 72px;
    color: var(--error-color);
}

.error-container h3 {
    margin-bottom: 12px;
    color: var(--text-color);
    font-size: 1.3rem;
    font-weight: 600;
}

.error-container p {
    margin-bottom: 32px;
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

.error-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .payment-details-header {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .payment-details-header h1 {
        font-size: 1.3rem;
    }
    
    .student-summary-card,
    .payment-summary-card,
    .invoice-section,
    .secure-payment-section {
        margin-bottom: 16px;
        
    }
    
    .calculation-row {
        padding: 12px 16px;
    }
    
    .discount-input-container {
        min-width: 120px;
    }
    
    .invoice-table-header,
    .invoice-item {
        grid-template-columns: 2fr 0.8fr 0.8fr 1fr;
        gap: 8px;
        padding: 12px 16px;
        font-size: 0.85rem;
    }
    
    .item-description {
        font-size: 0.9rem;
    }
    
    .item-month,
    .item-due-date {
        font-size: 0.8rem;
    }
    
    .item-amount {
        font-size: 1rem;
    }
    
    .secure-payment-section {
        padding: 20px;
    }
    
    .professional-pay-btn {
        max-width: 100%;
        padding: 10px 17px;
        font-size: 1rem;
        gap: 10px;
    }
    
    .professional-pay-btn .material-icons {
        font-size: 1.2rem;
    }
    
    .professional-pay-btn .btn-text {
        font-size: 1rem;
    }
    
    .professional-pay-btn .btn-amount {
        font-size: 1.1rem;
        padding: 3px 10px;
    }
    
    .invoice-header {
        flex-direction: column;
        gap: 16px;
        text-align: left;
    }
    
    .invoice-meta {
        text-align: left;
    }
    
    .summary-row {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .summary-row.total-row {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .invoice-table-header,
    .invoice-item {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 16px;
    }
    
    .invoice-item {
        text-align: left;
    }
    
    .item-month,
    .item-due-date,
    .item-amount {
        text-align: left;
        margin-top: 4px;
    }
    
    .item-description {
        font-weight: 700;
        margin-bottom: 8px;
    }
    
    .btn-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .btn-icon,
    .btn-arrow {
        margin: 0;
        align-self: center;
    }
    
    .security-features {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .payment-details-header {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .payment-details-header h1 {
        font-size: 1.2rem;
    }
    
    .student-summary-card,
    .payment-summary-card,
    .fee-details-section {
        margin-bottom: 16px;
        padding: 16px;
    }
    
    .payment-details-actions {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 16px;
        margin: 16px 0;
    }
    
    .fee-breakdown-item {
        flex-direction: column;
        gap: 12px;
    }
    
    .fee-item-amount {
        align-items: flex-start;
    }
}

/* Payment Gateway Page Styles */
.payment-gateway-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 32px;
    border-bottom: 2px solid rgba(33, 150, 243, 0.1);
}

.payment-gateway-header .header-content h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-color);
    font-weight: 700;
}

.payment-gateway-header .header-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-top: 4px;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.security-badge .material-icons {
    font-size: 1rem;
}

/* Professional Lock Payment Gateway Header */
.payment-gateway-header-professional {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #1565c0 0%, #1976d2 100%);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(21, 101, 192, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0;
    margin-bottom: 0;
    height: 80px;
}

.secure-header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1565c0 0%, #1976d2 100%);
    opacity: 0.95;
}

.security-pattern {
    display: none;
}

@keyframes securityPattern {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(30px) translateY(30px); }
}

.header-content-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 25px;
    color: white;
    height: 80px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.professional-back-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    backdrop-filter: blur(5px);
}

.professional-back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.professional-back-btn .material-icons {
    font-size: 20px;
}

.lock-icon-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lock-outer-ring {
    width: 44px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.lock-inner-ring {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.lock-icon {
    font-size: 18px !important;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.security-pulse {
    position: absolute;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(76, 175, 80, 0.4);
    border-radius: 8px;
    animation: securityPulse 2s ease-in-out infinite;
}

@keyframes securityPulse {
    0% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 0.3; }
    100% { transform: scale(1.2); opacity: 0; }
}

.header-center {
    flex: 1;
    text-align: center;
    margin: 0 15px;
}

.secure-payment-title h1 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.3px;
}

.payment-subtitle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
}

.payment-subtitle .material-icons {
    font-size: 16px;
    color: #81c784;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.security-indicators {
    display: flex;
    align-items: center;
    gap: 8px;
}

.indicator-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.08);
    padding: 3px 6px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.indicator-item .material-icons {
    font-size: 12px;
    color: #81c784;
}

.security-footer {
    display: none;
}

.transaction-info,
.encryption-info {
    display: none;
}

/* Adjust container padding to account for fixed header */
#payment-gateway-page .container {
    padding-top: 90px;
}

/* Responsive design for professional header */
@media (max-width: 768px) {
    .payment-gateway-header-professional {
        height: 70px;
    }
    
    .header-content-wrapper {
        padding: 12px 15px;
        height: 70px;
    }
    
    .header-left {
        gap: 12px;
    }
    
    .professional-back-btn {
        width: 36px;
        height: 36px;
    }
    
    .professional-back-btn .material-icons {
        font-size: 18px;
    }
    
    .lock-outer-ring {
        width: 38px;
        height: 38px;
    }
    
    .lock-inner-ring {
        width: 30px;
        height: 30px;
    }
    
    .lock-icon {
        font-size: 16px !important;
    }
    
    .secure-payment-title h1 {
        font-size: 1.2rem;
    }
    
    .payment-subtitle {
        font-size: 0.75rem;
    }
    
    .header-right {
        gap: 8px;
    }
    
    .security-indicators {
        gap: 6px;
    }
    
    .indicator-item {
        font-size: 0.65rem;
        padding: 2px 4px;
    }
    
    .indicator-item .material-icons {
        font-size: 10px;
    }
    
    #payment-gateway-page .container {
        padding-top: 50px;
    }
}

@media (max-width: 480px) {
    .payment-gateway-header-professional {
        height: 65px;
    }
    
    .header-content-wrapper {
        padding: 10px 12px;
        height: 65px;
    }
    
    .header-left {
        gap: 10px;
    }
    
    .lock-outer-ring {
        width: 45px;
        height: 45px;
    }
    
    .lock-inner-ring {
        width: 34px;
        height: 34px;
    }
    
    .lock-icon {
        font-size: 18px !important;
    }
    
    .secure-payment-title h1 {
        font-size: 1.2rem;
    }
    
    .payment-subtitle {
        font-size: 0.8rem;
    }
    
    
}

/* Payment Final Summary */
.payment-final-summary {
    background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(33, 150, 243, 0.12);
    border: 1px solid rgba(33, 150, 243, 0.1);
}

/* Payment Body Details Card */
.payment-body-details {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
}

.payment-body-details .details-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e1e5e9;
}

.payment-body-details .details-header .material-icons {
    color: #2196F3;
    margin-right: 10px;
    font-size: 24px;
}

.payment-body-details .details-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #e1e5e9;
    transition: all 0.3s ease;
}

.detail-row:hover {
    background: #e3f2fd;
    border-left-color: #2196F3;
}

.detail-row.highlight {
    background: linear-gradient(135deg, #e8f5e8, #f1f8e9);
    border-left-color: #4CAF50;
    font-weight: 600;
}

.detail-row.highlight .detail-value {
    color: #2e7d32;
    font-weight: 700;
    font-size: 16px;
}

.detail-label {
    color: #666;
    font-weight: 500;
    font-size: 14px;
}

.detail-value {
    color: #333;
    font-weight: 600;
    font-size: 14px;
    text-align: right;
}

.narration-section, .remarks-section {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #2196F3;
}

.narration-label, .remarks-label {
    color: #666;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.narration-text, .remarks-text {
    color: #333;
    font-size: 14px;
    line-height: 1.4;
}

.student-code {
    color: #666;
    font-size: 12px;
    margin-top: 2px;
}

.payment-final-summary .summary-header {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.payment-final-summary .summary-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.student-payment-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(33, 150, 243, 0.1);
}

.student-avatar-small {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-color);
}

.student-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-payment-details h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.student-payment-details p {
    margin: 4px 0 0 0;
    color: #666;
    font-size: 0.9rem;
}

.amount-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.amount-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.amount-row.discount-row {
    color: #4caf50;
    font-weight: 600;
}

.amount-row.total-row {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    border-top: 2px solid rgba(33, 150, 243, 0.1);
    padding-top: 16px;
    margin-top: 8px;
}

/* Payment Method Selection */
.payment-method-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.payment-method-section .method-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.payment-method-section .method-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method:hover {
    border-color: var(--primary-color);
    background: rgba(33, 150, 243, 0.05);
}

.payment-method.active {
    border-color: var(--primary-color);
    background: rgba(33, 150, 243, 0.1);
}

.payment-method .method-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 8px;
}

.payment-method .method-details h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
}

.payment-method .method-details p {
    margin: 4px 0 0 0;
    color: #666;
    font-size: 0.85rem;
}

.payment-method .method-badge {
    margin-left: auto;
    color: var(--primary-color);
}

/* Security Features */
.security-features {
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 32px;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.security-features .security-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: #4caf50;
}

.security-features .security-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.security-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4caf50;
    font-size: 0.9rem;
    font-weight: 500;
}

.security-item .material-icons {
    font-size: 1rem;
}

/* Payment Gateway Actions */
.payment-gateway-actions {
    text-align: center;
    margin-bottom: 32px;
}

.gateway-pay-btn {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 16px auto;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
}

.gateway-pay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.4);
}

.gateway-pay-btn:active {
    transform: translateY(0);
}

.gateway-pay-btn .btn-amount {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
}

.payment-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #666;
    font-size: 0.85rem;
    margin: 0;
}

.payment-note .material-icons {
    font-size: 1rem;
    color: var(--primary-color);
}

/* Mobile responsiveness for payment body details */
@media (max-width: 768px) {
    .payment-body-details {
        padding: 20px;
        margin: 0 10px 15px;
    }
    
    .details-grid {
        gap: 10px;
    }
    
    .detail-row {
        padding: 10px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .detail-value {
        text-align: left;
        font-size: 16px;
    }
    
    .detail-row.highlight .detail-value {
        font-size: 18px;
    }
    
    .narration-section, .remarks-section {
        padding: 12px;
    }
}

/* Payment Result Containers */
.payment-result-container {
    text-align: center;
    padding: 40px 20px;
}

.result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
}

.result-icon.success {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
}

.result-icon.error {
    background: linear-gradient(135deg, #f44336, #e57373);
    color: white;
}

.result-icon.processing {
    background: linear-gradient(135deg, #ff9800, #ffb74d);
}

.result-icon .material-icons {
    font-size: 2.5rem;
}

.processing-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.payment-result-container h2 {
    margin: 0 0 16px 0;
    font-size: 1.5rem;
    color: var(--text-color);
}

.payment-result-container p {
    margin: 0 0 32px 0;
    color: #666;
    font-size: 1rem;
}

/* Success Details */
.success-details {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 32px;
    border: 1px solid rgba(33, 150, 243, 0.1);
}

.success-details .detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(33, 150, 243, 0.1);
}

.success-details .detail-item:last-child {
    border-bottom: none;
}

.success-details .label {
    color: #666;
    font-size: 0.9rem;
}

.success-details .value {
    color: var(--text-color);
    font-weight: 600;
}

/* Processing Steps */
.processing-steps {
    max-width: 300px;
    margin: 0 auto;
    text-align: left;
}

.step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    color: #999;
    transition: all 0.3s ease;
}

.step.active {
    color: var(--primary-color);
}

.step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.step.active .step-icon {
    background: var(--primary-color);
    color: white;
}

/* Action Buttons */
.success-actions, .failed-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 300px;
    margin: 0 auto;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .payment-gateway-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .security-items {
        grid-template-columns: 1fr;
    }
    
    .gateway-pay-btn {
        font-size: 1rem;
        padding: 14px 24px;
    }
    
    .success-actions, .failed-actions {
        max-width: 100%;
    }
}

/* Payment Input Section Styles */
.payment-input-section {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 0;
    margin: 25px 0;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
}

.payment-input-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.input-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-content .material-icons {
    font-size: 28px;
    opacity: 0.9;
}

.header-text h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.header-text p {
    margin: 5px 0 0 0;
    opacity: 0.8;
    font-size: 0.9rem;
}

.toggle-section .toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.toggle-section .toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.toggle-section .toggle-btn.collapsed .material-icons {
    transform: rotate(180deg);
}

.input-form {
    padding: 30px;
    transition: all 0.3s ease;
    display: block; /* Default to visible */
}

.input-form.collapsed {
    display: none !important;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 15px;
    border: 1px solid rgba(230, 235, 241, 0.8);
}

.form-section h4 {
    color: #4c63d2;
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section h4 .material-icons {
    font-size: 20px;
}

.input-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 15px;
}

.input-row:last-child {
    margin-bottom: 0;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.input-group.full-width {
    grid-column: 1 / -1;
}

.input-group label {
    color: #374151;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.input-group label .material-icons {
    font-size: 18px;
    color: #6366f1;
    opacity: 0.8;
}

.input-group label::after {
    content: "*";
    color: #ef4444;
    margin-left: 4px;
    display: none;
}

.input-group label[for*="paid-amount"]::after,
.input-group label[for*="payment-mode"]::after {
    display: inline;
}

.input-group input,
.input-group textarea,
.input-group select {
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    font-family: inherit;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.input-group input.readonly-input {
    background: linear-gradient(145deg, #f8fafc, #e2e8f0);
    color: #64748b;
    cursor: not-allowed;
    border-color: #cbd5e1;
}

.input-group input.calculated-field {
    background: linear-gradient(145deg, #ecfdf5, #d1fae5);
    border-color: #10b981;
    color: #065f46;
    font-weight: 600;
}

.input-group textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

.input-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.input-group select option {
    padding: 10px;
    background: white;
    color: #374151;
}

/* Hidden Payment Reference Field */
.input-group#payment-ref-group.hidden {
    display: none;
}

.input-group#payment-ref-group {
    transition: all 0.3s ease;
}

.input-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid rgba(229, 231, 235, 0.8);
    margin-top: 25px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-transform: none;
    letter-spacing: 0.3px;
    min-width: 160px;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.reset-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border: 2px solid transparent;
}

.reset-btn:hover {
    background: linear-gradient(135deg, #ff5252, #e53e3e);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.update-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: 2px solid transparent;
}

.update-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.action-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.action-btn .material-icons {
    font-size: 20px;
}

/* Animation for form validation */
.input-group.error input,
.input-group.error select,
.input-group.error textarea {
    border-color: #ef4444;
    background: rgba(254, 242, 242, 0.8);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Loading state for buttons */
.action-btn.loading {
    pointer-events: none;
    position: relative;
    color: transparent;
}

.action-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success message animation */
@keyframes slideIn {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.success-message {
    animation: slideIn 0.3s ease !important;
}

/* Responsive design for input section */
@media (max-width: 1024px) {
    .input-row {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .payment-input-section {
        margin: 20px 0;
        border-radius: 15px;
    }
    
    .input-header {
        padding: 15px 20px;
        border-radius: 15px 15px 0 0;
    }
    
    .header-content {
        gap: 12px;
    }
    
    .header-content .material-icons {
        font-size: 24px;
    }
    
    .header-text h3 {
        font-size: 1.3rem;
    }
    
    .input-form {
        padding: 20px;
    }
    
    .form-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .input-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .input-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .action-btn {
        min-width: auto;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .input-header {
        padding: 12px 15px;
    }
    
    .header-text h3 {
        font-size: 1.2rem;
    }
    
    .header-text p {
        font-size: 0.8rem;
    }
    
    .input-form {
        padding: 15px;
    }
    
    .form-section {
        padding: 12px;
        border-radius: 10px;
    }
    
    .input-group input,
    .input-group textarea,
    .input-group select {
        padding: 12px 14px;
        font-size: 0.95rem;
        border-radius: 10px;
    }
    
    .action-btn {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
}

/* Professional Success Message Styles */
.payment-result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.payment-result-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.success-animation {
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.success-checkmark {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: #4CAF50;
    stroke-miterlimit: 10;
    box-shadow: 
        0 20px 60px rgba(76, 175, 80, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
    animation: successPulse 2s ease-in-out infinite;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
}

.checkmark {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: #4CAF50;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #4CAF50;
    animation: checkmarkFill 0.4s ease-in-out 0.4s forwards, checkmarkScale 0.3s ease-in-out 0.9s both;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 3;
    stroke-miterlimit: 10;
    stroke: #4CAF50;
    fill: none;
    animation: checkmarkStroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 3;
    stroke: #4CAF50;
    animation: checkmarkStroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes checkmarkStroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes checkmarkScale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes checkmarkFill {
    100% {
        box-shadow: inset 0px 0px 0px 60px #4CAF50;
    }
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 
            0 20px 60px rgba(76, 175, 80, 0.3),
            inset 0 0 20px rgba(255, 255, 255, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 
            0 25px 80px rgba(76, 175, 80, 0.4),
            inset 0 0 25px rgba(255, 255, 255, 0.3);
    }
}

.success-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 50px 40px;
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.1),
        0 20px 40px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
    max-width: 600px;
    width: 100%;
    position: relative;
    z-index: 2;
    animation: successSlideUp 0.6s ease-out 0.3s both;
}

@keyframes successSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2E7D32;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(46, 125, 50, 0.1);
    letter-spacing: -0.5px;
}

.success-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin: 0 0 40px 0;
    font-weight: 400;
}

.payment-success-summary {
    margin-bottom: 40px;
}

.success-amount {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 20px 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

.amount-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 5px;
    font-weight: 500;
}

.amount-value {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.success-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.detail-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 15px;
    border: 1px solid rgba(230, 235, 241, 0.6);
    transition: all 0.3s ease;
}

.detail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
}

.detail-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.detail-icon .material-icons {
    font-size: 20px;
}

.detail-content {
    flex: 1;
    text-align: left;
}

.detail-label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 3px;
    font-weight: 500;
}

.detail-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.success-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn-success-primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
    min-width: 180px;
    justify-content: center;
}

.btn-success-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(76, 175, 80, 0.4);
    background: linear-gradient(135deg, #45a049, #4CAF50);
}

.btn-success-secondary {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 2px solid rgba(102, 126, 234, 0.3);
    padding: 13px 28px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    min-width: 180px;
    justify-content: center;
}

.btn-success-secondary:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-1px);
}

.redirect-info {
    border-top: 1px solid rgba(230, 235, 241, 0.8);
    padding-top: 25px;
    margin-top: 25px;
}

.redirect-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 15px;
}

.redirect-message .material-icons {
    font-size: 18px;
    color: #2196F3;
}

#redirect-countdown {
    font-weight: 700;
    color: #2196F3;
    min-width: 15px;
    display: inline-block;
}

.btn-redirect-now {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.btn-redirect-now:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(33, 150, 243, 0.3);
}

/* Responsive Design for Success Page */
@media (max-width: 768px) {
    .success-content {
        padding: 30px 25px;
        margin: 20px;
    }
    
    .success-title {
        font-size: 2rem;
    }
    
    .amount-value {
        font-size: 1.8rem;
    }
    
    .success-details-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .success-actions {
        flex-direction: column;
    }
    
    .btn-success-primary,
    .btn-success-secondary {
        width: 100%;
    }
}




/* Compact Student Card Design */
.student-card-compact {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #cee3f3 0%, #f3cee8 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 80px;
}

.student-card-compact:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6;
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

.student-card-compact:active {
    transform: translateY(-2px);
    transition: transform 0.1s ease;
}

/* Card Left Section - Profile Icon */
.card-left {
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.student-card-compact:hover .profile-icon {
    transform: scale(1.1);
}

.profile-icon .material-icons {
    font-size: 32px;
    color: white;
    font-weight: 500;
}

/* Card Center Section - Main Info */
.card-center {
    flex: 1;
    min-width: 0;
    padding-right: 16px;
}

.student-name {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.student-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.father-name,
.mobile-number {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #0093ff;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.father-name {
    margin-bottom: 2px;
}

/* Card Right Section - Class & Roll */
.card-right {
    text-align: right;
    display: ruby;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    min-width: 80px;
}

.class-section {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    letter-spacing: 0.025em;
    min-width: 60px;
    text-align: center;
    transition: transform 0.3s ease;
}

.student-card-compact:hover .class-section {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.roll-number {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

/* Animation for card entrance */
.student-card-compact {
    animation: slideInUp 0.4s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state for search results */
.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #64748b;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results count header */
.results-count {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    color: #475569;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 16px;
}

.results-count .material-icons {
    color: #3b82f6;
    font-size: 20px;
}

/* No results state */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #64748b;
    text-align: center;
}

.no-results .material-icons {
    font-size: 64px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.no-results h3 {
    font-size: 20px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.no-results p {
    font-size: 14px;
    color: #64748b;
}

/* Responsive design */
@media (max-width: 768px) {
    .student-card-compact {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .card-left {
        margin-right: 12px;
    }
    
    .profile-icon {
        width: 48px;
        height: 48px;
    }
    
    .profile-icon .material-icons {
        font-size: 28px;
    }
    
    .student-name {
        font-size: 16px;
    }
    
    .student-details {
        flex-direction: column;
    }
    
    .father-name,
    .mobile-number {
        font-size: 13px;
    }
    
    .class-section {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .card-right {
        min-width: 70px;
    }
}

@media (max-width: 480px) {
    .student-card-compact {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }
    
    .card-left {
        margin-right: 0;
        margin-bottom: 12px;
    }
    
    .card-center {
        padding-right: 0;
        margin-bottom: 12px;
    }
    
    .card-right {
        width: 100%;
        align-items: center;
    }
    
    .student-details {
        flex-direction: row;
        justify-content: center;
        gap: 16px;
    }
}

/* Accessibility improvements */
.student-card-compact:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.student-card-compact:focus:not(:focus-visible) {
    outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .student-card-compact {
        border: 2px solid #000;
    }
    
    .student-name {
        color: #000;
        font-weight: 800;
    }
    
    .class-section {
        background: #000;
        color: #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .student-card-compact,
    .profile-icon,
    .class-section {
        transition: none;
    }
    
    .student-card-compact {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .loading-spinner {
        animation: none;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .student-card-compact {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        border-color: #475569;
    }
    
    .student-card-compact:hover {
        background: linear-gradient(135deg, #334155 0%, #475569 100%);
        border-color: #60a5fa;
    }
    
    .student-name {
        color: #f1f5f9;
    }
    
    .father-name,
    .mobile-number {
        color: #cbd5e1;
    }
    
    .roll-number {
        background: #475569;
        border-color: #64748b;
        color: #e2e8f0;
    }
}