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

:root {
    --primary-blue: #0066cc;
    --dark-blue: #004499;
    --light-blue: #e6f2ff;
    --accent-blue: #3399ff;
    --white: #ffffff;
    --gray-100: #f8fafc;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --success: #10b981;
    --danger: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--white) 50%, var(--light-blue) 100%);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.5;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px 20px;
}

/* Header & Logo Section - Compact */
.header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: var(--white);
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.logo {
    width: 52px;
    height: 52px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 20px;
    color: var(--primary-blue);
    box-shadow: var(--shadow-md);
    border: 3px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.header-text h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 2px;
    letter-spacing: -0.3px;
}

.header-text p {
    opacity: 0.9;
    font-size: 13px;
    font-weight: 500;
}

/* Progress Steps - Compact */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
    position: relative;
    padding: 0 10px;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: var(--gray-200);
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--gray-600);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.step.active .step-number {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
    transform: scale(1.08);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
}

.step.completed .step-number {
    background: var(--success);
    border-color: var(--success);
    color: var(--white);
}

.step-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-600);
    text-align: center;
}

.step.active .step-label {
    color: var(--primary-blue);
}

/* Page Container */
.page {
    display: none;
    animation: fadeIn 0.4s ease;
}

.page.active {
    display: block;
}

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

/* Card Styling - Compact */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--light-blue);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, var(--primary-blue), var(--accent-blue));
    border-radius: 2px;
}

/* Form Grid - Responsive 12-Column Grid System */
.form-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 12px 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    grid-column: span 6;
}

.form-group.full-width,
.col-12 {
    grid-column: span 12;
}

.col-6 {
    grid-column: span 6;
}

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

    .form-group,
    .col-6,
    .col-12,
    .form-group.full-width {
        grid-column: 1 / -1;
    }
}

label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--gray-800);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.required::after {
    content: ' *';
    color: var(--danger);
}

/* Crisp White Background for Editable Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
    padding: 6px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    font-size: 13.5px;
    font-family: inherit;
    transition: all 0.25s ease;
    background: var(--white);
    color: var(--gray-800);
    height: 42px;
    line-height: 1.4;
}

/* Readonly / Disabled Fields: Gray Background */
input[readonly],
input:disabled,
select:disabled,
textarea:disabled,
.table-input[readonly],
.table-input:disabled {
    background-color: var(--gray-100) !important;
    color: var(--gray-600) !important;
    border-color: var(--gray-200) !important;
    cursor: not-allowed;
    opacity: 0.85;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    padding-right: 32px;
}

/* Radio Button Group - Compact */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}

.radio-item {
    position: relative;
}

.radio-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 13px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    height: 36px;
}

.radio-item input[type="radio"]:checked + .radio-label {
    background: var(--light-blue);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

.radio-label::before {
    content: '';
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: 50%;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.radio-item input[type="radio"]:checked + .radio-label::before {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    box-shadow: inset 0 0 0 2px var(--white);
}

/* Compact Photo Upload & Preview Section */
.compact-photo-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--white);
    padding: 10px 14px;
    border-radius: 10px;
    border: 1.5px dashed var(--gray-300);
    transition: all 0.3s ease;
}

.compact-photo-wrapper:hover {
    border-color: var(--primary-blue);
    background: var(--light-blue);
}

.photo-preview-box {
    width: 80px;
    height: 96px;
    border-radius: 8px;
    border: 2px dashed var(--gray-300);
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.photo-preview-box:hover {
    border-color: var(--primary-blue);
    transform: scale(1.02);
}

.photo-preview-box.has-image {
    border-style: solid;
    border-color: var(--success);
}

.upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-icon-compact {
    font-size: 22px;
    color: var(--primary-blue);
}

.upload-text-compact {
    font-size: 10px;
    font-weight: 600;
    color: var(--gray-600);
    margin-top: 2px;
    text-align: center;
}

.preview-image-compact {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    border-radius: 6px;
}

.preview-image-compact.visible {
    display: block;
}

.photo-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.photo-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--gray-800);
}

.photo-hint {
    font-size: 11.5px;
    color: var(--gray-600);
}

.photo-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--success);
    background-color: #d1fae5;
    padding: 2px 8px;
    border-radius: 4px;
}

.btn-upload-trigger {
    padding: 5px 12px;
    background: var(--white);
    border: 1.5px solid var(--primary-blue);
    color: var(--primary-blue);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-start;
    margin-top: 4px;
}

.btn-upload-trigger:hover {
    background: var(--primary-blue);
    color: var(--white);
}

/* Conditional Field Display */
.conditional-field {
    display: none;
    margin-top: 6px;
    animation: fadeIn 0.3s ease;
}

.conditional-field.visible {
    display: block;
}

/* Section Divider & Titles */
.section-divider {
    grid-column: 1 / -1;
    height: 1px;
    background: var(--gray-200);
    margin: 8px 0;
}

.section-title {
    grid-column: 1 / -1;
    font-size: 14px;
    font-weight: 700;
    color: var(--dark-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Load Profiling Dynamic Table */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    margin-top: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: var(--white);
    padding: 8px 10px;
    font-weight: 600;
    text-align: left;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.4px;
}

td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--gray-200);
}

tr:nth-child(even) {
    background: var(--gray-100);
}

tr:hover {
    background: var(--light-blue);
}

.table-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    font-size: 13px;
    height: 32px;
    background: var(--white);
}

.table-input:focus {
    border-color: var(--primary-blue);
    outline: none;
}

.btn-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 16px;
}

.btn-add {
    background: var(--success);
    color: white;
}

.btn-add:hover {
    background: #059669;
    transform: scale(1.05);
}

.btn-delete {
    background: var(--danger);
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* Form Buttons */
.btn-group {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1.5px solid var(--gray-200);
}

.btn {
    padding: 10px 22px;
    border-radius: 8px;
    border: none;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: var(--white);
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 10px rgba(0, 102, 204, 0.35);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-800);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.25);
}

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

/* Validation Highlights */
.invalid input,
.invalid select,
input.invalid,
select.invalid,
.compact-photo-wrapper.invalid {
    border-color: var(--danger) !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18) !important;
}

/* Toast Warning Banner */
.toast-banner {
    position: fixed;
    top: 16px;
    right: 16px;
    background: var(--danger);
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    font-size: 13.5px;
    font-weight: 600;
    z-index: 9999;
    display: none;
    align-items: center;
    gap: 8px;
    animation: slideDown 0.3s ease;
}

.toast-banner.visible {
    display: flex;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Success Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: modalScale 0.3s ease;
}

@keyframes modalScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-icon {
    width: 60px;
    height: 60px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
}

.modal h2 {
    font-size: 20px;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.modal p {
    font-size: 13.5px;
    color: var(--gray-600);
    margin-bottom: 20px;
}

/* ==========================================
   GLASSMORPHISM DESIGN SYSTEM & UTILITIES
   ========================================== */

body.glass-theme {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background: #0f172a;
    color: #f8fafc;
}

.glass-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 15% 15%, #1e1b4b 0%, #0f172a 45%, #020617 100%);
    overflow: hidden;
    padding: 24px 16px;
}

/* Floating ambient glow orbs */
.glass-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
}

.glass-orb-1 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, #6366f1 0%, #4f46e5 100%);
    top: -50px;
    left: -50px;
    animation: orbFloat1 18s ease-in-out infinite alternate;
}

.glass-orb-2 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, #ec4899 0%, #8b5cf6 100%);
    bottom: -100px;
    right: -80px;
    animation: orbFloat2 22s ease-in-out infinite alternate;
}

.glass-orb-3 {
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, #06b6d4 0%, #3b82f6 100%);
    top: 40%;
    left: 60%;
    animation: orbFloat3 15s ease-in-out infinite alternate;
}

@keyframes orbFloat1 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(120px, 80px) scale(1.15); }
    100% { transform: translate(-40px, 140px) scale(0.9); }
}

@keyframes orbFloat2 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-100px, -120px) scale(1.2); }
    100% { transform: translate(60px, -60px) scale(0.95); }
}

@keyframes orbFloat3 {
    0% { transform: translate(0, 0) scale(0.9); }
    50% { transform: translate(-80px, 90px) scale(1.1); }
    100% { transform: translate(70px, -70px) scale(1); }
}

/* Glass Card Container */
.glass-card {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    border-radius: 24px;
    padding: 40px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card-lg {
    max-width: 900px;
    width: 100%;
}

.glass-card-sm {
    max-width: 440px;
    width: 100%;
}

.glass-card-header {
    text-align: center;
    margin-bottom: 32px;
}

.glass-badge-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(129, 140, 248, 0.3);
    border-radius: 9999px;
    color: #a5b4fc;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: 16px;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.glass-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.glass-subtitle {
    font-size: 14px;
    color: #94a3b8;
}

/* Glass Inputs */
.glass-form-group {
    margin-bottom: 22px;
    position: relative;
}

.glass-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.glass-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.glass-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 16px;
    pointer-events: none;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    transition: color 0.2s ease;
}

.glass-input {
    width: 100%;
    height: 50px;
    padding: 12px 20px 12px 50px;
    background: #0b1329;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #818cf8;
    font-size: 15px;
    font-family: inherit;
    font-weight: 500;
    line-height: normal;
    outline: none;
    transition: all 0.25s ease;
    position: relative;
    z-index: 1;
}

.glass-input.glass-input-password {
    padding-right: 50px;
}

.glass-input::placeholder {
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
    opacity: 1;
}

.glass-input:focus {
    background: #0f172a;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), 0 0 15px rgba(99, 102, 241, 0.2);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.glass-input:focus + .glass-input-icon,
.glass-input-wrapper:focus-within .glass-input-icon {
    color: #818cf8;
}

/* Autofill styling: fixes text contrast and background turning light */
.glass-input:-webkit-autofill,
.glass-input:-webkit-autofill:hover, 
.glass-input:-webkit-autofill:focus, 
.glass-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #0b1329 inset !important;
    box-shadow: 0 0 0 1000px #0b1329 inset !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
    caret-color: #ffffff !important;
    border-color: #6366f1 !important;
    transition: background-color 50000s ease-in-out 0s;
    font-size: 15px !important;
}

.glass-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 15px;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: color 0.2s ease;
    border-radius: 6px;
}

.glass-toggle-btn:hover {
    color: #ffffff;
}

/* Glass Buttons */
.glass-btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4), 0 0 15px rgba(99, 102, 241, 0.2);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.glass-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.6), 0 0 25px rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

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

.glass-btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.glass-btn-secondary {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #e2e8f0;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.glass-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Glass Alerts */
.glass-alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fca5a5;
    font-size: 13.5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
}

.glass-alert-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    color: #6ee7b7;
    font-size: 13.5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
}

/* Profile / Dashboard Layout Elements */
.glass-profile-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
}

@media (max-width: 768px) {
    .glass-profile-grid {
        grid-template-columns: 1fr;
    }
}

.glass-sidebar {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 28px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.glass-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 16px;
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.glass-role-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 8px;
}

.role-badge-gis {
    background: rgba(14, 165, 233, 0.18);
    border: 1px solid rgba(14, 165, 233, 0.4);
    color: #38bdf8;
}

.role-badge-admin {
    background: rgba(168, 85, 247, 0.18);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #c084fc;
}

.role-badge-default {
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #818cf8;
}

.glass-detail-card {
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 20px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.glass-detail-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.glass-detail-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.glass-detail-value {
    font-size: 15px;
    font-weight: 600;
    color: #f1f5f9;
    word-break: break-all;
}

.glass-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 13.5px;
}

.glass-dot-active {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 10px #10b981;
}

.glass-dot-inactive {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ef4444;
    box-shadow: 0 0 10px #ef4444;
}

/* Keyframes spinner */
.glass-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: glassSpin 0.7s linear infinite;
}

@keyframes glassSpin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   MASTERPAGE LAYOUT (SIDEBAR & TOPBAR)
   ========================================== */

.master-layout {
    display: flex;
    min-height: 100vh;
    background-color: #f8fafc;
}

/* Glassmorphism Sidebar with ALL WHITE TEXT */
.master-sidebar {
    width: 270px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    color: #ffffff !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    z-index: 100;
}

.master-sidebar *,
.master-sidebar a,
.master-sidebar span,
.master-sidebar div,
.master-sidebar i,
.master-sidebar button {
    color: #ffffff !important;
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.sidebar-brand-title {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.04em;
}

.brand-sub {
    font-size: 11px;
    opacity: 0.8;
}

.sidebar-user-mini {
    padding: 14px 16px;
    margin: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    flex-shrink: 0;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-user-name {
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 11px;
    opacity: 0.85;
}

.sidebar-nav {
    padding: 12px 16px;
    flex-grow: 1;
}

.nav-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    opacity: 0.7;
    margin-bottom: 10px;
    padding-left: 8px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
    margin-bottom: 6px;
}

.sidebar-nav-link:hover,
.sidebar-nav-link.active {
    background: rgba(255, 255, 255, 0.22) !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-icon {
    font-size: 17px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logout-btn {
    width: 100%;
    padding: 11px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s ease;
}

.sidebar-logout-btn:hover {
    background: rgba(239, 68, 68, 0.45) !important;
}

/* Master Main Shell & Topbar */
.master-main-shell {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.master-topbar {
    height: 64px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-page-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-info-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    font-size: 13px;
    color: #475569;
}

.topbar-role-chip {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.chip-icon {
    font-size: 14px;
}

.chip-label {
    font-weight: 500;
    color: #64748b;
}

.chip-value {
    font-weight: 700;
    color: #0f172a;
}

.topbar-btn-logout {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #fee2e2;
    background: #fef2f2;
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all 0.2s ease;
}

.topbar-btn-logout:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

.master-content-body {
    padding: 28px;
    flex-grow: 1;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

/* ==========================================
   STANDARD PAGE PROFILE STYLING (NON-GLASS)
   ========================================== */

.std-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.std-profile-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
}

@media (max-width: 768px) {
    .std-profile-grid {
        grid-template-columns: 1fr;
    }
}

.std-sidebar-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.std-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.std-detail-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 20px;
}

.std-detail-label {
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.std-detail-value {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    word-break: break-all;
}

/* ==========================================
   MOBILE & TABLET RESPONSIVE HAMBURGER SYSTEM
   ========================================== */

.hamburger-btn {
    display: none;
}

.sidebar-close-btn {
    display: none;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Tablet & Mobile Breakpoint (< 992px) */
@media (max-width: 991.98px) {
    .master-layout {
        flex-direction: column;
    }

    .hamburger-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 42px !important;
        height: 42px !important;
        border-radius: 10px !important;
        background: #0f172a !important;
        border: 1px solid #334155 !important;
        color: #ffffff !important;
        font-size: 20px !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        margin-right: 14px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
        z-index: 100 !important;
        flex-shrink: 0 !important;
    }

    .hamburger-btn i {
        color: #ffffff !important;
        font-size: 20px !important;
    }

    .hamburger-btn:hover {
        background: #1e293b !important;
    }

    .sidebar-close-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 8px;
        color: #ffffff !important;
        font-size: 16px;
        cursor: pointer;
        margin-left: auto;
    }

    .master-sidebar {
        position: fixed;
        top: 0;
        left: -290px;
        width: 280px;
        height: 100vh;
        z-index: 1050;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.4);
    }

    .master-sidebar.mobile-open {
        left: 0;
    }

    .master-topbar {
        padding: 0 16px;
        height: 60px;
    }

    .topbar-left {
        display: flex;
        align-items: center;
    }

    .master-content-body {
        padding: 14px;
        min-width: 0;
        max-width: 100%;
        overflow-x: hidden;
    }
}

/* Small Mobile Breakpoint (< 576px) */
@media (max-width: 575.98px) {
    .std-card {
        padding: 16px;
        border-radius: 12px;
    }

    .glass-card {
        padding: 24px 18px;
        border-radius: 18px;
    }

    .glass-title {
        font-size: 22px;
    }

    .topbar-info-chip {
        padding: 4px 10px;
        font-size: 11.5px;
    }

    .chip-label {
        display: none;
    }

    .topbar-title-text {
        font-size: 14px;
    }

    .std-card {
        padding: 18px 14px;
    }
}

/* Application Details Page Styles */
.form-section {
    background: #ffffff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
}

.form-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0369a1;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
    border: 2px solid #0284c7;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.info-box h4 {
    color: #0369a1;
    margin-bottom: 14px;
    font-size: 1rem;
    font-weight: 700;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.info-item span {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
}

.checkbox-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 10px 0;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dynamic-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.dynamic-table th {
    background: #e0f2fe;
    color: #0369a1;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 700;
}

.dynamic-table td {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
}

/* Global Blazor Error UI */
#blazor-error-ui {
    color-scheme: light only;
    background: #fef08a;
    color: #854d0e;
    bottom: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 10000;
    font-size: 0.9rem;
    font-weight: 500;
}

#blazor-error-ui a.reload {
    color: #1e40af;
    text-decoration: underline;
    margin-left: 6px;
    font-weight: 600;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
    font-size: 1.1rem;
    color: #713f12;
}

/* Ensure SweetAlert dialogs always render on top of modal backdrops */
.swal2-container {
    z-index: 100000 !important;
}