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

:root {
    --bg-gradient: linear-gradient(135deg, #ffffff 0%, #f9fafb 50%, #f3f4f6 100%);
    --panel-bg: #ffffff;
    --panel-border: rgba(0, 0, 0, 0.08);
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    
    --primary: #1e3a8a;
    --primary-glow: rgba(30, 58, 138, 0.15);
    --accent: #0284c7;
    --accent-glow: rgba(2, 132, 199, 0.15);
    --purple: #7c3aed;
    --purple-glow: rgba(124, 58, 237, 0.15);
    
    --success: #059669;
    --success-glow: rgba(5, 150, 105, 0.1);
    --warning: #d97706;
    --danger: #e11d48;
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg-gradient);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Typography & Headers */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #111827;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}
a:hover {
    color: var(--accent);
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.08);
}

/* Navigation Header */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--panel-border);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-item {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
}

.nav-item:hover, .nav-item.active {
    color: var(--primary);
    background: rgba(0, 0, 0, 0.04);
}

.nav-btn-logout {
    background: rgba(244, 63, 94, 0.1);
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.2);
    font-weight: 600;
}

.nav-btn-logout:hover {
    background: var(--danger);
    color: #ffffff;
    border-color: var(--danger);
}

/* Layout Containers */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 2.5rem auto;
    padding: 0 2rem;
    flex: 1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
    user-select: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
    background: linear-gradient(135deg, var(--primary) 10%, #9333ea 100%);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px var(--success-glow);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #e11d48 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.2);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.35);
}

.btn-icon {
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
}

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input {
    width: 100%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    padding: 0.85rem 1.2rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

/* Cards & Layout Grid */
.grid-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 968px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }
}

.auth-card {
    max-width: 520px;
    width: 100%;
    margin: 4rem auto;
    padding: 3rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Info Box / Status Message Alert */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-md);
    border: 1px solid transparent;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInDown 0.3s ease;
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
    color: #065f46;
}

.alert-danger {
    background: rgba(244, 63, 94, 0.08);
    border-color: rgba(244, 63, 94, 0.2);
    color: #9f1239;
}

.alert-info {
    background: rgba(6, 182, 212, 0.08);
    border-color: rgba(6, 182, 212, 0.2);
    color: #0e7490;
}

/* Micro-animations */
@keyframes slideInDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.steps-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(0, 0, 0, 0.08);
    transform: translateY(-50%);
    z-index: 1;
}

.step-bubble {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f3f4f6;
    border: 2px solid rgba(0, 0, 0, 0.1);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    position: relative;
    z-index: 2;
    transition: var(--transition-smooth);
}

.step-bubble.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 0 15px var(--primary-glow);
}

.step-bubble.completed {
    background: var(--success);
    border-color: var(--success);
    color: #ffffff;
    box-shadow: 0 0 15px var(--success-glow);
}

/* Profile Section Card */
.profile-card {
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid var(--panel-border);
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-md);
    background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.profile-meta h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.profile-meta p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: rgba(30, 58, 138, 0.08);
    color: var(--primary);
    border: 1px solid rgba(30, 58, 138, 0.2);
}

.badge-success {
    background: rgba(5, 150, 105, 0.08);
    color: var(--success);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.badge-warning {
    background: rgba(217, 119, 6, 0.08);
    color: var(--warning);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.stats-grid {
    display: flex;
    gap: 1.5rem;
}

.stat-item {
    text-align: right;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* Course Search & Adding */
.search-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-icon-wrapper {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input-field {
    padding-left: 3rem;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-md);
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    z-index: 50;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    display: none;
}

.search-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

.search-item-info h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.search-item-info p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.search-item-add {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent);
    padding: 0.4rem 0.8rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.search-item-add:hover {
    background: var(--accent);
    color: #ffffff;
}

/* Category Modal or Inline Configuration Overlay */
.course-configure-panel {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    margin-bottom: 1.5rem;
    display: none;
    animation: slideInDown 0.3s ease;
}

.course-configure-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.radio-group {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
}

.radio-input {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
}

/* Cart Panel & Checkout */
.cart-panel {
    padding: 2rem;
    height: 100%;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 0.75rem;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    max-height: 380px;
    overflow-y: auto;
}

.cart-item {
    background: rgba(0, 0, 0, 0.01);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--border-radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
    animation: slideInDown 0.2s ease;
}

.cart-item:hover {
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.03);
}

.cart-item-detail h4 {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.cart-item-detail p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.cart-item-remove {
    background: rgba(244, 63, 94, 0.1);
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.2);
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-weight: 600;
}

.cart-item-remove:hover {
    background: var(--danger);
    color: #ffffff;
}

.cart-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem 0;
    font-size: 0.95rem;
}

/* Pricing Breakdown */
.pricing-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.pricing-row.total {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-primary);
}

/* History / Existing Registration Table */
.dashboard-section-title {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.resit-table-wrapper {
    overflow-x: auto;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--panel-border);
}

.resit-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.resit-table th {
    background: rgba(0, 0, 0, 0.02);
    color: var(--text-secondary);
    padding: 1rem 1.25rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.resit-table td {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
}

.resit-table tr:last-child td {
    border-bottom: none;
}

.resit-table tr:hover {
    background: rgba(0, 0, 0, 0.01);
}

/* Payment Layout & Details */
.payment-card {
    max-width: 680px;
    margin: 3rem auto;
    padding: 3.5rem;
    text-align: center;
}

.payment-success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 2rem;
    border: 2px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 20px var(--success-glow);
}

.payment-receipt-info {
    text-align: left;
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.receipt-row:last-child {
    margin-bottom: 0;
}

.receipt-row .label {
    color: var(--text-secondary);
}

.receipt-row .value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Footer styling */
footer {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: auto;
    border-top: 1px solid var(--panel-border);
}
