/* =====================================================
   STUDENT PLATFORM SG - MASTER STYLESHEET
   Version: 2.0
   Updated: With fixed button colors (white text on purple)
   ===================================================== */

/* =====================================================
   RESET & BASE STYLES
   ===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* =====================================================
   TYPOGRAPHY
   ===================================================== */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 15px;
    font-weight: 600;
}

h1 { font-size: 32px; }
h2 { font-size: 26px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }

a {
    text-decoration: none;
    color: #667eea;
}

p {
    margin-bottom: 10px;
}

/* =====================================================
   BUTTON STYLES - WHITE TEXT ON PURPLE BACKGROUNDS
   ===================================================== */

/* Primary Button - Purple Gradient with WHITE TEXT */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    transition: transform 0.2s, opacity 0.2s;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    opacity: 0.9;
    color: white !important;
}

.btn-primary:active {
    transform: translateY(0);
}

/* Large Primary Button */
.btn-primary.btn-large {
    padding: 16px 48px;
    font-size: 18px;
}

/* Block Primary Button (full width) */
.btn-primary.btn-block {
    width: 100%;
    display: block;
}

/* Secondary Button - Outline (Purple border, purple text) */
.btn-secondary {
    background: transparent;
    color: #667eea !important;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    transition: all 0.2s;
    border: 2px solid #667eea;
    cursor: pointer;
    text-align: center;
}

.btn-secondary:hover {
    background: #667eea;
    color: white !important;
    border-color: #667eea;
}

/* Small Button */
.btn-small {
    background: #f0f0f0;
    color: #667eea !important;
    padding: 6px 15px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 12px;
    display: inline-block;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-small:hover {
    background: #667eea;
    color: white !important;
}

/* Action Buttons in Dashboard */
.action-btn {
    background: #f8f9fa;
    padding: 12px;
    text-align: center;
    border-radius: 10px;
    text-decoration: none;
    color: #333 !important;
    transition: all 0.2s;
    display: block;
    font-weight: 500;
}

.action-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    transform: translateY(-2px);
}

/* Download Button (Green) */
.btn-download {
    background: #27ae60;
    color: white !important;
    border: none;
    padding: 8px 20px;
    border-radius: 25px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-download:hover {
    background: #219a52;
    color: white !important;
}

/* Apply Button for Tasks (Purple Gradient) */
.btn-apply {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    width: 100%;
    margin-top: 15px;
    font-weight: 600;
    transition: opacity 0.2s;
}

.btn-apply:hover {
    opacity: 0.9;
    color: white !important;
}

/* Send Button in Chat (Purple Gradient) */
.send-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    border: none;
    padding: 0 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s;
}

.send-btn:hover {
    opacity: 0.9;
    color: white !important;
}

/* Purchase Button (Purple Gradient) */
.btn-purchase {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    transition: opacity 0.2s;
}

.btn-purchase:hover {
    opacity: 0.9;
    color: white !important;
}

/* Login Button (Outline - Purple border) */
.btn-login {
    background: transparent;
    color: #667eea !important;
    border: 2px solid #667eea;
    padding: 8px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-login:hover {
    background: #667eea;
    color: white !important;
}

/* Register Button (Purple Gradient) */
.btn-register {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 8px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.btn-register:hover {
    opacity: 0.9;
    color: white !important;
}

/* WhatsApp Button (Green) */
.btn-whatsapp {
    background: #25D366;
    color: white !important;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-whatsapp:hover {
    background: #128C7E;
    color: white !important;
}

/* Instant Payment Withdraw Button (White background, green text) */
.btn-instant {
    background: white;
    color: #27ae60 !important;
    border: none;
    padding: 8px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 13px;
    display: inline-block;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-instant:hover {
    background: #f0f0f0;
    color: #27ae60 !important;
}

/* Small button variants */
.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.2s;
}

.btn-sm:hover {
    opacity: 0.9;
}

.btn-accept {
    background: #27ae60;
    color: white !important;
}

.btn-accept:hover {
    background: #219a52;
    color: white !important;
}

.btn-reject {
    background: #e74c3c;
    color: white !important;
}

.btn-reject:hover {
    background: #c0392b;
    color: white !important;
}

.btn-danger {
    background: #e74c3c;
    color: white !important;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-danger:hover {
    background: #c0392b;
    color: white !important;
}

.btn-success {
    background: #27ae60;
    color: white !important;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-success:hover {
    background: #219a52;
    color: white !important;
}

/* Admin Buttons */
.btn-approve {
    background: #27ae60;
    color: white !important;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn-approve:hover {
    background: #219a52;
}

.btn-reject {
    background: #e74c3c;
    color: white !important;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn-resolve {
    background: #3498db;
    color: white !important;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* =====================================================
   NAVIGATION STYLES
   ===================================================== */
.navbar {
    background: white;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.logo-accent {
    background: linear-gradient(135deg, #764ba2 0%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #667eea;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-weight: 500;
    color: #667eea;
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
    background: linear-gradient(135deg, #667eea 20%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero h1 {
    font-size: 52px;
    margin-bottom: 20px;
    color: white;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 50px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
}

.stat {
    text-align: center;
}

.stat span {
    font-size: 32px;
    font-weight: bold;
    display: block;
}

/* =====================================================
   CONTAINER & LAYOUT
   ===================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
    color: #333;
}

/* =====================================================
   FEATURES SECTION
   ===================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.feature-card p {
    color: #666;
    margin-bottom: 15px;
}

.feature-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

/* =====================================================
   HOW IT WORKS SECTION
   ===================================================== */
.how-it-works {
    background: #f8f9fa;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto 20px;
}

/* =====================================================
   TESTIMONIALS SECTION
   ===================================================== */
.testimonials {
    background: white;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 15px;
}

.testimonial-author {
    font-weight: 600;
    color: #667eea;
}

/* =====================================================
   CTA SECTION
   ===================================================== */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 60px 24px;
}

.cta-section h2 {
    font-size: 36px;
    margin-bottom: 15px;
    color: white;
}

.cta-section p {
    margin-bottom: 30px;
    font-size: 18px;
}

/* =====================================================
   DASHBOARD STYLES
   ===================================================== */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 24px;
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    font-size: 28px;
    margin-bottom: 15px;
}

/* Balance Cards */
.balance-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.balance-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.balance-card.instant {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.balance-label {
    font-size: 14px;
    margin-bottom: 10px;
    opacity: 0.8;
}

.balance-amount {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dashboard-card h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Sessions List */
.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
}

.session-subject {
    font-size: 12px;
    color: #666;
}

.session-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-completed {
    background: #e0f2e9;
    color: #27ae60;
}

.status-active {
    background: #ffeaa7;
    color: #f39c12;
}

.status-scheduled {
    background: #e3f2fd;
    color: #3498db;
}

/* Tips Section */
.tips-section {
    background: #e3f2fd;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

/* =====================================================
   AUTH PAGES (LOGIN/REGISTER)
   ===================================================== */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 40px 20px;
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    color: #667eea;
    margin-bottom: 10px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.auth-form .form-group input,
.auth-form .form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s;
}

.auth-form .form-group input:focus,
.auth-form .form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
}

/* =====================================================
   FORM STYLES
   ===================================================== */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 15px 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}

/* =====================================================
   ALERTS & NOTIFICATIONS
   ===================================================== */
.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdef5;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* =====================================================
   STATUS BANNER
   ===================================================== */
.status-banner {
    padding: 12px 0;
    text-align: center;
    font-size: 14px;
}

.status-warning {
    background: #fff3cd;
    color: #856404;
    border-bottom: 1px solid #ffeeba;
}

.status-info {
    background: #d1ecf1;
    color: #0c5460;
    border-bottom: 1px solid #bee5eb;
}

/* =====================================================
   FOOTER
   ===================================================== */
.main-footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    color: #999;
}

/* =====================================================
   ERROR PAGES
   ===================================================== */
.error-container {
    text-align: center;
    padding: 100px 20px;
}

.error-container h1 {
    font-size: 100px;
    color: #667eea;
}

/* =====================================================
   CARD COMPONENTS
   ===================================================== */
.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.info-box {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    font-size: 13px;
}

/* =====================================================
   EDUCATION BADGES & TAGS
   ===================================================== */
.education-badge {
    background: #f0f0f0;
    padding: 8px 12px;
    border-radius: 10px;
    display: inline-block;
    margin: 5px;
}

.subject-tag {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin: 3px;
}

.tutor-subject-tag {
    background: #e3f2fd;
    color: #1565c0;
}

.rating-stars {
    color: #f39c12;
    margin-top: 8px;
}

/* =====================================================
   TEXT UTILITIES
   ===================================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-success { color: #27ae60; }
.text-danger { color: #e74c3c; }
.text-warning { color: #f39c12; }
.text-info { color: #3498db; }

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */
@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .nav-links {
        display: none;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .balance-cards {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 30px 16px;
    }
    
    .auth-card {
        padding: 25px;
    }
    
    .btn-primary, .btn-secondary {
        padding: 10px 20px;
        font-size: 13px;
    }
}