:root {
    --sb-primary: #ff6b6b;
    --sb-primary-dark: #e35d5d;
    --sb-secondary: #4f46e5;
    --sb-surface: rgba(15, 23, 42, 0.6);
    --sb-glass: rgba(255, 255, 255, 0.08);
    --sb-text: #0f172a;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(circle at top left, #f9fafc 0%, #eef2ff 40%, #fdf2f8 100%);
    color: var(--sb-text);
}

@keyframes pulse-to-green {
    0%, 100% {
        color: #10b981 !important;
        text-shadow: 0 0 10px rgba(16, 185, 129, 0.6) !important;
    }
    50% {
        color: #059669 !important;
        text-shadow: 0 0 5px rgba(5, 150, 105, 0.3) !important;
    }
}

.glass-nav {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.85), rgba(30, 64, 175, 0.8));
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 40px rgba(79, 70, 229, 0.25);
}

.glass-nav .nav-link, .glass-nav .navbar-brand {
    color: #f8fafc !important;
    transition: opacity 0.2s ease;
}

.glass-nav a.nav-link.nav-link-pulse,
.glass-nav a.nav-link.nav-link-pulse:hover,
.glass-nav a.nav-link.nav-link-pulse:focus {
    color: #22c55e !important;
    animation: pulse-to-green 2s ease-in-out infinite !important;
}

.brand-title {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-title .brand-line {
    display: block;
}

.heading-split {
    line-height: 1.05;
}

.heading-split span {
    display: block;
}

.heading-split span:last-child {
    color: var(--sb-primary);
}

.glass-nav .nav-link:hover {
    opacity: 0.8;
}

.main-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 3rem 0 4rem;
}

.content-wrapper {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 1.5rem;
    box-shadow: 0 50px 100px -30px rgba(15, 23, 42, 0.25);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.content-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 107, 107, 0.15), transparent 60%);
    pointer-events: none;
}

.gradient-title {
    font-weight: 700;
    background: linear-gradient(120deg, var(--sb-secondary), var(--sb-primary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-title a {
    background: inherit;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: inherit;
    text-decoration: none;
}

.gradient-title a:hover,
.gradient-title a:focus {
    text-decoration: none;
    opacity: 0.9;
}

.page-subtitle {
    color: #475569;
}

.glass-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 28px 60px -35px rgba(15, 23, 42, 0.35);
    border-radius: 1.2rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.page-header .title {
    font-size: clamp(1.75rem, 5vw, 2.4rem);
    margin: 0;
}

.page-header .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pill-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(79, 70, 229, 0.12);
    color: #312e81;
    padding: 0.55rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
}

.section-heading {
    font-weight: 600;
    color: #312e81;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.table-wrapper {
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.92);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.card-soft {
    background: rgba(255, 255, 255, 0.96);
    border: none;
    border-radius: 1.3rem;
    box-shadow: 0 22px 45px -28px rgba(30, 64, 175, 0.32);
}

.card-soft .card-header {
    background: transparent;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    font-weight: 600;
    color: #1e3a8a;
}

.badge-soft {
    background: rgba(79, 70, 229, 0.1);
    color: #3730a3;
    font-weight: 600;
}

@keyframes sb-alert-flash {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45);
    }
    50% {
        opacity: 0.45;
        transform: scale(1.08);
        box-shadow: 0 0 0 12px rgba(220, 38, 38, 0);
    }
}

@keyframes sb-alert-text-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.55;
    }
}

.message-alert-badge {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff !important;
    animation: sb-alert-flash 1.15s ease-in-out infinite;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.message-alert-text {
    color: #dc2626 !important;
    animation: sb-alert-text-pulse 1.15s ease-in-out infinite;
}

.support-link,
.support-trigger {
    position: relative;
}

.support-flash-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
    font-size: 0.65rem;
    box-shadow: 0 0 0 2px rgba(248, 250, 252, 0.95);
}

.support-link-unread .support-flash-icon,
.support-trigger-unread .support-flash-icon {
    animation: sb-alert-flash 1.15s ease-in-out infinite;
}

.support-link-unread .support-flash-icon {
    position: absolute;
    top: -4px;
    right: -10px;
}

.support-flash-inline {
    margin-left: 0.4rem;
    position: relative;
    top: -1px;
}

.text-muted-soft {
    color: #6b7280 !important;
}

.glass-table {
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
}

table.table thead {
    background: linear-gradient(120deg, rgba(79, 70, 229, 0.85), rgba(147, 51, 234, 0.75));
    color: #f8fafc;
}

table.table tbody tr {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

table.table tbody tr:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 30px -25px rgba(79, 70, 229, 0.6);
}

.alert {
    border-radius: 1rem;
    border: none;
    padding: 1rem 1.5rem;
    box-shadow: 0 18px 45px -25px rgba(15, 23, 42, 0.35);
}

footer {
    background: rgba(15, 23, 42, 0.92);
    color: #e2e8f0;
    padding: 1.5rem 0;
    font-size: 0.95rem;
}

footer a {
    color: #cbd5f5;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* String button style: white background, green text & outline; on hover green background with white text */
.btn-string {
    background: #ffffff;
    color: #059669; /* green-600 */
    border: 1px solid #059669;
}
.btn-string:hover,
.btn-string:focus {
    background: #059669;
    color: #ffffff;
    border-color: #059669;
    text-decoration: none;
}

.action-button {
    min-width: 95px;
}

.badge {
    border-radius: 999px;
}

.navigation-divider {
    width: 1px;
    background: rgba(148, 163, 184, 0.35);
    height: 28px;
    margin: 0 1rem;
}

.stringer-indicator {
    display: flex;
    align-items: center;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.main-content {
    padding-top: 1rem;
}

@media (max-width: 991px) {
    .content-wrapper {
        padding: 1rem;
    }

    .glass-nav {
        backdrop-filter: none;
    }

    .main-content {
        padding: 2rem 0 3rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== ENHANCED FORM STYLING ===== */

/* Form control improvements */
.form-control, 
.form-select {
    border: 1.5px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.65rem 1rem;
    font-size: 1rem;
    background: #ffffff;
    transition: all 0.2s ease;
}

.form-control:focus, 
.form-select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: #9ca3af;
}

.form-control:hover {
    border-color: #d1d5db;
}

/* Form labels */
.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

/* Form groups with better spacing */
.form-group,
.mb-3 {
    margin-bottom: 1.25rem;
}

/* Form group in rows */
.form-group.col-md-6,
.col-md-6 {
    margin-bottom: 1rem;
}

/* Required field indicator */
.form-label .required,
.required-indicator {
    color: #ef4444;
    margin-left: 0.25rem;
    font-weight: 700;
}

/* Helper text styling */
.form-text {
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 0.4rem;
    display: block;
}

.form-text.text-muted {
    color: #9ca3af;
}

/* Input group improvements */
.input-group .form-control {
    border-right: 1.5px solid #e5e7eb;
}

.input-group-text {
    background: #f3f4f6;
    border: 1.5px solid #e5e7eb;
    color: #6b7280;
    font-weight: 500;
    border-radius: 0.75rem;
}

/* Select field improvements */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2310b981' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-select:hover {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2310b981' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    border-color: #d1d5db;
}

/* Radio and checkbox improvements */
.form-check {
    margin-bottom: 0.75rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 1.5px solid #d1d5db;
    border-radius: 0.35rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-check-input:hover {
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

.form-check-input:checked {
    background-color: #10b981;
    border-color: #10b981;
    box-shadow: none;
}

.form-check-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.form-check-label {
    margin-bottom: 0;
    color: #374151;
    user-select: none;
    cursor: pointer;
    font-weight: 500;
}

/* Step container styling */
.form-step {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-step.active {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.08);
}

/* Step title styling */
.step-title,
h3.step-title {
    color: #111827;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-title-icon {
    color: #10b981;
    font-size: 1.5rem;
}

/* Step description/helper text */
.step-description,
.step-helper-text {
    color: #4b5563;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.step-description strong {
    color: #10b981;
    font-weight: 600;
}

/* Form error styling */
.is-invalid.form-control {
    border-color: #ef4444;
}

.is-invalid.form-control:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.invalid-feedback {
    color: #ef4444;
    font-size: 0.9rem;
    display: block;
    margin-top: 0.4rem;
    font-weight: 500;
}

.is-valid.form-control {
    border-color: #10b981;
}

.is-valid.form-control:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.valid-feedback {
    color: #10b981;
    font-size: 0.9rem;
    display: block;
    margin-top: 0.4rem;
    font-weight: 500;
}

/* Email validation feedback styling */
.form-control.is-valid {
    padding-right: calc(1.5em + 0.75rem);
}

.form-control.is-invalid {
    padding-right: calc(1.5em + 0.75rem);
    border-color: #dc3545;
}

#emailValidationFeedback {
    display: flex;
    align-items: center;
}

/* Form row spacing */
.row.form-row {
    row-gap: 1rem;
}

/* Two column form layout */
.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

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

/* Input group button improvements */
.input-group .btn {
    border-radius: 0.75rem;
}

.input-group.with-icon .form-control {
    padding-left: 2.75rem;
}

.input-group.with-icon .input-group-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    z-index: 1;
}

/* Mobile optimizations */
@media (max-width: 576px) {
    .form-control,
    .form-select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .form-label {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
        width: 100%;
    }
}
