/* Mobile App View Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f5f7fa;
    color: #2d3748;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile App Container - FIXED BOTTOM PADDING FOR ALL PAGES */
.mobile-app-container {
    max-width: 480px;
    margin: 0 auto;
    background: #f5f7fa;
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    padding-bottom: 70px !important;
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeOut 0.5s ease 2s forwards;
}

.splash-content {
    text-align: center;
    color: white;
}

.splash-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.app-name {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.app-tagline {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* Loading Dots */
.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.loading-dots span {
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

/* Login Page */
.login-container {
    padding: 30px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 30px 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    animation: slideUp 0.5s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
}

.login-title {
    font-size: 24px;
    color: #2d3748;
    margin-bottom: 5px;
}

.login-subtitle {
    color: #718096;
    font-size: 14px;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    display: block;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

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

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

.btn-primary:active {
    transform: translateY(0);
}

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

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

/* ============================================
   BOTTOM NAVIGATION - FIXED FOR ALL PAGES
   ============================================ */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 12px 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    border-top: 1px solid #e2e8f0;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    color: #a0aec0;
    transition: all 0.2s ease;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 12px;
    flex: 1;
}

.nav-item.active {
    color: #667eea;
}

.nav-item:active {
    transform: scale(0.95);
}

.nav-icon {
    font-size: 22px !important;
}

.nav-label {
    font-size: 11px;
    font-weight: 500;
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
    .mobile-app-container {
        padding-bottom: 20px !important;
    }
    
    .bottom-nav {
        display: none !important;
    }
}

/* Mobile specific adjustments */
@media (max-width: 768px) {
    .mobile-app-container {
        padding-bottom: 75px !important;
    }
    
    .bottom-nav {
        padding: 8px 12px 18px;
    }
    
    .nav-icon {
        font-size: 20px !important;
    }
    
    .nav-label {
        font-size: 10px;
    }
    
    .nav-item {
        padding: 6px 12px;
    }
}

/* Cards */
.card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

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

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

/* Payment Items */
.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f7fafc;
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.payment-item:hover {
    background: #edf2f7;
}

.payment-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #2d3748;
}

.payment-info p {
    font-size: 14px;
    color: #718096;
}

.payment-amount {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #c6f6d5;
    color: #22543d;
}

.badge-pending {
    background: #feebc8;
    color: #744210;
}

.badge-failed {
    background: #fed7d7;
    color: #742a2a;
}

/* Progress Bar */
.progress-container {
    margin: 20px 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Animations */
@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

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

@keyframes pop {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-pop {
    animation: pop 0.5s cubic-bezier(0.26, 0.53, 0.74, 1.44) forwards;
}

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

.animate-slide-up {
    animation: slideUp 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .mobile-app-container {
        max-width: 100%;
        border-radius: 0;
    }
    
    .card {
        border-radius: 12px;
    }
}

/* Student Dashboard - Compact Header */
.student-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 20px 25px;
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
}

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

.welcome-text h2 {
    font-size: 14px;
    font-weight: normal;
    opacity: 0.9;
    margin-bottom: 2px;
}

.welcome-text h1 {
    font-size: 18px;
    font-weight: 600;
}

.notification-icon {
    position: relative;
    cursor: pointer;
    background: rgba(255,255,255,0.2);
    width: 40px;
    height: 40px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-icon i {
    font-size: 18px;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f56565;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.student-avatar-small {
    width: 45px;
    height: 45px;
    border-radius: 25px;
    border: 2px solid white;
    object-fit: cover;
}

.profile-details p {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 2px;
}

.profile-details p:first-child {
    font-size: 13px;
    font-weight: 500;
    opacity: 1;
}

.student-avatar {
    width: 80px;
    height: 80px;
    border-radius: 40px;
    border: 4px solid white;
    margin-bottom: 15px;
    object-fit: cover;
}

.student-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.student-info {
    font-size: 14px;
    opacity: 0.9;
}

/* Quick Actions - Compact */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 15px 20px;
    margin-top: -20px;
}

.action-card {
    background: white;
    border-radius: 14px;
    padding: 12px 8px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.action-icon {
    font-size: 22px;
    color: #667eea;
    margin-bottom: 5px;
}

.action-label {
    font-size: 11px;
    font-weight: 500;
    color: #4a5568;
}

/* Summary Grid */
.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.summary-item {
    text-align: center;
    padding: 12px;
    background: #f7fafc;
    border-radius: 12px;
}

.summary-value {
    font-size: 22px;
    font-weight: 700;
    color: #667eea;
}

.summary-label {
    font-size: 12px;
    color: #718096;
    margin-top: 4px;
}

/* Quick Links */
.quick-links {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.quick-link-btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: #f7fafc;
    border-radius: 10px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    color: #667eea;
    transition: all 0.2s ease;
}

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

/* Receipt */
.receipt-container {
    background: white;
    border-radius: 20px;
    padding: 30px 20px;
    margin: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.receipt-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px dashed #e2e8f0;
    padding-bottom: 20px;
}

.receipt-title {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
}

.receipt-ref {
    color: #718096;
    font-size: 14px;
}

.receipt-detail {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.receipt-label {
    color: #718096;
    font-weight: 500;
}

.receipt-value {
    color: #2d3748;
    font-weight: 600;
}

.receipt-total {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    animation: slideUp 0.3s ease;
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.modal-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.modal-body {
    text-align: center;
    color: #718096;
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    gap: 10px;
}

/* Bottom Spacer - Prevents content from hiding behind bottom nav */
.bottom-spacer {
    height: 75px;
    width: 100%;
    display: block;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.empty-state i {
    font-size: 48px;
    color: #cbd5e0;
    margin-bottom: 15px;
}

/* Scrollable content area */
.scrollable-content {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Small button */
.btn-sm {
    padding: 10px;
    font-size: 13px;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 8px;
}

.mb-2 {
    margin-bottom: 8px;
}