/* ================= RESET & BASE ================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy-900: #0A1F44;
    --navy-700: #173B7A;
    --gold-500: #C9A227;
    --gold-400: #DDB43A;
    --gold-300: #E8C766;
    --gold-soft: rgba(201, 162, 39, 0.12);
    --emerald: #059669;
    --emerald-500: #10B981;
    --emerald-soft: rgba(5, 150, 105, 0.1);
    --red-500: #DC2626;
    --red-600: #B91C1C;
    --red-soft: rgba(220, 38, 38, 0.1);
    --blue-500: #3B82F6;
    --blue-soft: rgba(59, 130, 246, 0.1);
    --orange-500: #F59E0B;
    --orange-soft: rgba(245, 158, 11, 0.1);
    --purple-500: #8B5CF6;
    --purple-soft: rgba(139, 92, 246, 0.1);
    --bg-white: #FFFFFF;
    --bg-light: #F8FAFC;
    --text-dark: #0F172A;
    --text-body: #334155;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --border: #E2E8F0;
    --shadow-sm: 0 4px 16px rgba(10, 31, 68, 0.06);
    --shadow-md: 0 12px 32px rgba(10, 31, 68, 0.10);
    --shadow-lg: 0 24px 60px rgba(10, 31, 68, 0.16);
    --shadow-gold: 0 12px 30px rgba(201, 162, 39, 0.35);
    --radius: 14px;
    --radius-lg: 22px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
    background: linear-gradient(180deg, #F8FAFC 0%, #EEF2F7 100%);
    color: var(--text-body);
    line-height: 1.75;
    font-size: 15.5px;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; border: none; background: none; }

::selection { background: var(--gold-500); color: var(--navy-900); }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--gold-500);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ================= LOADING SCREEN ================= */
.loading-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    color: #fff;
}
.loading-screen.hide { opacity: 0; visibility: hidden; }
.loading-screen .spinner-lg {
    width: 50px; height: 50px;
    border: 4px solid rgba(255,255,255,0.15);
    border-top-color: var(--gold-400);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-screen p { font-size: 15px; font-weight: 700; color: rgba(255,255,255,0.8); }

/* ================= HEADER ================= */
.page-header {
    background: var(--navy-900);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(10, 31, 68, 0.15);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 800;
    font-size: 20px;
}
.logo-icon {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-300));
    border-radius: 10px;
    font-size: 19px;
    box-shadow: var(--shadow-gold);
}
.logo-text .accent { color: var(--gold-400); }
.header-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 10px;
    transition: var(--transition);
}
.header-back:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* ================= PAGE HERO ================= */
.page-hero {
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
    color: #fff;
    padding: 50px 0 90px;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.18), transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
}
.page-hero::after {
    content: '';
    position: absolute;
    bottom: -50%; left: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(30, 75, 148, 0.4), transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
}
.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
    text-align: center;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gold-soft);
    color: var(--gold-400);
    border: 1px solid rgba(201, 162, 39, 0.3);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 18px;
}
.hero-badge .dot {
    width: 8px; height: 8px;
    background: var(--emerald-500);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--emerald-500);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}
.page-hero h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.3rem);
    font-weight: 900;
    letter-spacing: -0.5px;
    line-height: 1.3;
    margin-bottom: 12px;
}
.page-hero h1 .accent { color: var(--gold-400); }
.page-hero p {
    font-size: clamp(14px, 1.6vw, 16px);
    color: rgba(255,255,255,0.75);
    max-width: 600px;
    margin: 0 auto;
}

/* ================= MAIN CONTAINER ================= */
.main-container {
    max-width: 1200px;
    margin: -60px auto 60px;
    padding: 0 24px;
    position: relative;
    z-index: 5;
}

/* ================= STEPPER ================= */
.stepper {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 20px 28px;
    box-shadow: var(--shadow-md);
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--border);
}
.step-item { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.step-num {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 50%;
    font-size: 15px; font-weight: 800;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: var(--transition);
    position: relative;
}
.step-item.active .step-num {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
    border-color: var(--gold-500);
    color: var(--navy-900);
    box-shadow: var(--shadow-gold);
}
.step-item.completed .step-num {
    background: linear-gradient(135deg, var(--emerald-500), var(--emerald));
    border-color: var(--emerald-500);
    color: #fff;
}
.step-item.completed .step-num::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    inset: 0;
    display: grid; place-items: center;
    font-size: 14px;
}
.step-item.completed .step-num span { display: none; }
.step-info { flex: 1; min-width: 0; }
.step-info h4 {
    font-size: 14px; font-weight: 800;
    color: var(--navy-900);
    margin-bottom: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.step-info p {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.step-item.active .step-info h4 { color: var(--gold-500); }
.step-item.completed .step-info h4 { color: var(--emerald); }
.step-connector { width: 40px; height: 2px; background: var(--border); flex-shrink: 0; }
.step-connector.completed { background: var(--emerald-500); }

/* ================= MOBILE PROGRESS ================= */
.mobile-progress {
    display: none;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.mobile-progress .progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 13px; font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 10px;
}
.mobile-progress .progress-track {
    height: 6px;
    background: var(--bg-light);
    border-radius: 100px;
    overflow: hidden;
}
.mobile-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-500), var(--gold-400));
    border-radius: 100px;
    transition: width 0.4s ease;
    width: 50%;
}

/* ================= SELECTED LAWYER CARD ================= */
.selected-lawyer-card {
    background: linear-gradient(135deg, #fff 0%, #FEFCE8 100%);
    border: 2px solid var(--gold-500);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(201, 162, 39, 0.15);
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}
.selected-lawyer-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
}
.selected-lawyer-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.selected-lawyer-avatar {
    width: 84px; height: 84px;
    border-radius: 18px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 8px 20px rgba(10, 31, 68, 0.12);
}
.selected-lawyer-online {
    position: absolute;
    bottom: -4px;
    left: -4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, var(--emerald-500), var(--emerald));
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 100px;
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}
.selected-lawyer-online .dot {
    width: 5px; height: 5px;
    background: #fff;
    border-radius: 50%;
    animation: blinkDot 1.5s ease-in-out infinite;
}
@keyframes blinkDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.selected-lawyer-info { flex: 1; min-width: 0; }
.selected-lawyer-info .label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.selected-lawyer-info .badge-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--emerald-soft);
    color: var(--emerald);
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 100px;
    border: 1px solid rgba(5, 150, 105, 0.25);
}
.selected-lawyer-info h3 {
    font-size: 18px;
    font-weight: 900;
    color: var(--navy-900);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.selected-lawyer-info h3 i {
    color: var(--emerald);
    font-size: 15px;
}
.selected-lawyer-info .title-text {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.selected-lawyer-info .title-text i { color: var(--gold-500); font-size: 11px; }
.selected-lawyer-info .title-text .rating-stars {
    color: #FBBF24;
    font-size: 12px;
    letter-spacing: -1px;
}
.btn-change-lawyer {
    padding: 10px 18px;
    background: #fff;
    border: 1.5px solid var(--border);
    color: var(--text-body);
    border-radius: 11px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    flex-shrink: 0;
}
.btn-change-lawyer:hover {
    border-color: var(--gold-500);
    color: var(--gold-500);
}

/* ================= SELECTED SERVICE CARD ================= */
.selected-service-card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}
.selected-service-icon {
    width: 60px; height: 60px;
    display: grid; place-items: center;
    border-radius: 16px;
    font-size: 24px;
    flex-shrink: 0;
}
.selected-service-icon.urgent {
    background: linear-gradient(135deg, #FEE2E2, #FECACA);
    color: var(--red-600);
}
.selected-service-icon.scheduled {
    background: linear-gradient(135deg, #DBEAFE, #BFDBFE);
    color: var(--blue-500);
}
.selected-service-icon.chat {
    background: linear-gradient(135deg, #F3E8FF, #E9D5FF);
    color: var(--purple-500);
}
.selected-service-icon.phone {
    background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
    color: var(--emerald);
}
.selected-service-info { flex: 1; min-width: 0; }
.selected-service-info h4 {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--navy-900);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.selected-service-info h4 .badge {
    font-size: 10.5px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 100px;
}
.badge-urgent { background: linear-gradient(135deg, var(--red-500), var(--red-600)); color: #fff; }
.badge-blue { background: linear-gradient(135deg, var(--blue-500), #2563EB); color: #fff; }
.badge-normal { background: linear-gradient(135deg, var(--emerald-500), var(--emerald)); color: #fff; }
.selected-service-info .service-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 600;
}
.selected-service-info .service-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.selected-service-info .service-meta i { color: var(--gold-500); font-size: 11px; }
.selected-service-price {
    text-align: left;
    padding-right: 16px;
    border-right: 1px dashed var(--border);
    flex-shrink: 0;
}
.selected-service-price .label {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 3px;
    display: block;
}
.selected-service-price .amount {
    font-size: 20px;
    font-weight: 900;
    color: var(--gold-500);
    line-height: 1.2;
}
.selected-service-price .amount small {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ================= FORM LAYOUT ================= */
.form-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}
.form-main {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    min-height: 400px;
}

/* ================= FORM STEP ================= */
.form-step { display: none; animation: fadeIn 0.4s ease; }
.form-step.active { display: block; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-title {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}
.step-title h2 {
    font-size: 20px; font-weight: 900;
    color: var(--navy-900);
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}
.step-title h2 .icon {
    width: 36px; height: 36px;
    display: grid; place-items: center;
    background: var(--gold-soft);
    color: var(--gold-500);
    border-radius: 10px;
    font-size: 16px;
}
.step-title p { font-size: 13.5px; color: var(--text-muted); }

/* ================= FORM FIELDS ================= */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.form-group { display: grid; gap: 8px; }
.form-group label {
    font-size: 13.5px; font-weight: 700;
    color: var(--navy-900);
    display: flex; align-items: center; justify-content: space-between;
}
.form-group label .required { color: var(--red-500); }
.form-group label .optional { font-size: 11.5px; font-weight: 500; color: var(--text-muted); }
.input-wrap { position: relative; }
.input-wrap input,
.input-wrap select,
.input-wrap textarea {
    width: 100%;
    padding: 13px 44px 13px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 14.5px;
    color: var(--text-dark);
    background: var(--bg-light);
    transition: var(--transition);
    font-family: inherit;
}
.input-wrap textarea {
    padding: 13px 14px;
    min-height: 120px;
    resize: vertical;
    line-height: 1.7;
}
.input-wrap select {
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    padding-left: 36px;
}
.input-wrap input::placeholder,
.input-wrap textarea::placeholder { color: var(--text-light); font-size: 13.5px; }
.input-wrap input:focus,
.input-wrap select:focus,
.input-wrap textarea:focus {
    outline: none;
    border-color: var(--gold-500);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.12);
}
.input-wrap input.error,
.input-wrap select.error,
.input-wrap textarea.error {
    border-color: var(--red-500);
    background: #FEF2F2;
    animation: shake 0.4s ease;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}
.input-icon {
    position: absolute;
    right: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 15px;
    pointer-events: none;
}
.input-wrap input:focus ~ .input-icon,
.input-wrap select:focus ~ .input-icon { color: var(--gold-500); }
.input-wrap textarea + .input-icon { top: 24px; transform: none; }
.form-hint { font-size: 11.5px; color: var(--text-muted); line-height: 1.6; }
.char-counter { font-size: 11.5px; color: var(--text-muted); text-align: left; font-weight: 600; }
.char-counter.near-limit { color: var(--orange-500); }
.char-counter.at-limit { color: var(--red-500); }

/* ================= FILE UPLOAD ================= */
.file-upload {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-light);
    margin-bottom: 12px;
}
.file-upload:hover { border-color: var(--gold-500); background: var(--gold-soft); }
.file-upload.dragover { border-color: var(--emerald-500); background: var(--emerald-soft); }
.file-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.file-upload-content {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    pointer-events: none;
}
.file-upload-content .icon {
    width: 48px; height: 48px;
    display: grid; place-items: center;
    background: var(--gold-soft);
    color: var(--gold-500);
    border-radius: 14px;
    font-size: 20px;
}
.file-upload-content .title { font-size: 14px; font-weight: 700; color: var(--navy-900); }
.file-upload-content .sub { font-size: 12px; color: var(--text-muted); }
.file-list { display: grid; gap: 8px; }
.file-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.file-item .file-icon {
    width: 36px; height: 36px;
    display: grid; place-items: center;
    background: var(--gold-soft);
    color: var(--gold-500);
    border-radius: 9px;
    font-size: 15px;
    flex-shrink: 0;
}
.file-item .file-info { flex: 1; min-width: 0; }
.file-item .file-name {
    font-size: 13px; font-weight: 700;
    color: var(--navy-900);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 2px;
}
.file-item .file-size { font-size: 11px; color: var(--text-muted); }
.file-item .file-remove {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    background: var(--red-soft);
    color: var(--red-500);
    border-radius: 8px;
    font-size: 12px;
    flex-shrink: 0;
}
.file-item .file-remove:hover { background: var(--red-500); color: #fff; }

/* ================= PAYMENT ================= */
.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}
.payment-method { position: relative; cursor: pointer; }
.payment-method input { position: absolute; opacity: 0; pointer-events: none; }
.payment-card {
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    transition: var(--transition);
    display: flex; align-items: center; gap: 12px;
}
.payment-method:hover .payment-card { border-color: var(--gold-500); transform: translateY(-2px); }
.payment-method input:checked ~ .payment-card {
    border-color: var(--gold-500);
    background: linear-gradient(135deg, var(--gold-soft), #fff);
    box-shadow: 0 8px 20px rgba(201, 162, 39, 0.15);
}
.payment-card .pm-icon {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    background: var(--bg-light);
    color: var(--navy-700);
    border-radius: 12px;
    font-size: 18px;
    flex-shrink: 0;
}
.payment-method input:checked ~ .payment-card .pm-icon {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
    color: var(--navy-900);
}
.payment-card .pm-info { flex: 1; min-width: 0; }
.payment-card .pm-title { font-size: 14px; font-weight: 800; color: var(--navy-900); margin-bottom: 2px; }
.payment-card .pm-desc { font-size: 11.5px; color: var(--text-muted); }

/* ================= DISCOUNT ================= */
.discount-wrapper { margin-bottom: 20px; }
.discount-input-group { display: flex; gap: 10px; align-items: stretch; }
.discount-input-group .input-wrap { flex: 1; position: relative; }
.discount-input-group .input-wrap input {
    width: 100%;
    padding: 13px 44px 13px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 14.5px;
    color: var(--text-dark);
    background: var(--bg-light);
    transition: var(--transition);
    font-family: inherit;
    letter-spacing: 1px;
    font-weight: 700;
}
.discount-input-group .input-wrap input:focus {
    outline: none;
    border-color: var(--gold-500);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.12);
}
.discount-input-group .input-wrap input.success { border-color: var(--emerald-500); background: #F0FDF4; }
.discount-input-group .input-wrap input.error { border-color: var(--red-500); background: #FEF2F2; }
.discount-input-group .input-wrap input:disabled { opacity: 0.7; cursor: not-allowed; }
.btn-apply-discount {
    padding: 13px 22px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    color: #fff;
    font-size: 14px; font-weight: 800;
    display: inline-flex; align-items: center; gap: 6px;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-apply-discount:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(10, 31, 68, 0.3); }
.btn-apply-discount:disabled { opacity: 0.5; cursor: not-allowed; }
.discount-message {
    margin-top: 10px;
    font-size: 13px; font-weight: 600;
    display: none; align-items: center; gap: 6px;
    padding: 10px 14px;
    border-radius: 10px;
}
.discount-message.show { display: flex; }
.discount-message.success {
    background: var(--emerald-soft);
    color: var(--emerald);
    border: 1px solid rgba(5, 150, 105, 0.25);
}
.discount-message.error {
    background: var(--red-soft);
    color: var(--red-500);
    border: 1px solid rgba(220, 38, 38, 0.25);
}
.discount-applied {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--emerald-soft), #fff);
    border: 2px solid rgba(5, 150, 105, 0.3);
    border-radius: var(--radius);
    margin-bottom: 20px;
}
.discount-applied-info { display: flex; align-items: center; gap: 12px; }
.discount-applied-info > i { font-size: 24px; color: var(--emerald); flex-shrink: 0; }
.discount-code-label { font-size: 11.5px; color: var(--text-muted); margin-bottom: 2px; }
.discount-code-value {
    font-size: 15px; font-weight: 900;
    color: var(--emerald);
    letter-spacing: 1px;
    direction: ltr; text-align: left;
}
.btn-remove-discount {
    padding: 8px 14px;
    background: rgba(220, 38, 38, 0.1);
    color: var(--red-500);
    border-radius: 8px;
    font-size: 12.5px; font-weight: 700;
    display: inline-flex; align-items: center; gap: 5px;
    flex-shrink: 0;
}
.btn-remove-discount:hover { background: var(--red-500); color: #fff; }

/* ================= TERMS ================= */
.terms-checkbox {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 16px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    user-select: none;
    margin-bottom: 20px;
    font-size: 13px; line-height: 1.7;
}
.terms-checkbox:hover { border-color: var(--gold-500); }
.terms-checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.terms-checkbox .check-box {
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-radius: 6px;
    display: grid; place-items: center;
    background: #fff;
    color: transparent;
    font-size: 11px;
    flex-shrink: 0;
    margin-top: 2px;
}
.terms-checkbox input:checked ~ .check-box {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
    border-color: var(--gold-500);
    color: var(--navy-900);
}
.terms-checkbox a { color: var(--gold-500); font-weight: 700; }

/* ================= FORM ACTIONS ================= */
.form-actions {
    display: flex; gap: 12px; justify-content: space-between;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.btn {
    padding: 13px 26px;
    border-radius: var(--radius);
    font-size: 14.5px; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: var(--transition);
    white-space: nowrap;
    cursor: pointer;
}
.btn-outline {
    background: #fff;
    color: var(--text-body);
    border: 2px solid var(--border);
}
.btn-outline:hover { border-color: var(--navy-900); color: var(--navy-900); }
.btn-primary {
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    color: #fff;
    box-shadow: 0 10px 26px rgba(10, 31, 68, 0.25);
    flex: 1;
    min-width: 180px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(10, 31, 68, 0.35); }
.btn-gold {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
    color: var(--navy-900);
    box-shadow: var(--shadow-gold);
    flex: 1;
    min-width: 200px;
}
.btn-gold:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(201, 162, 39, 0.5); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn .spinner-mini {
    width: 16px; height: 16px;
    border: 2px solid rgba(10,31,68,0.3);
    border-top-color: var(--navy-900);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

/* ================= SIDEBAR ================= */
.summary-sidebar { position: sticky; top: 90px; display: grid; gap: 16px; }
.summary-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}
.summary-card h3 {
    font-size: 16px; font-weight: 900;
    color: var(--navy-900);
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 8px;
}
.summary-card h3 .icon {
    width: 32px; height: 32px;
    display: grid; place-items: center;
    background: var(--gold-soft);
    color: var(--gold-500);
    border-radius: 9px;
    font-size: 14px;
}
.summary-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 0;
    font-size: 13.5px;
    border-bottom: 1px dashed var(--border);
}
.summary-row:last-child { border-bottom: none; }
.summary-row .label { color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.summary-row .value {
    font-weight: 800;
    color: var(--navy-900);
    text-align: left;
    max-width: 60%;
    word-break: break-word;
}
.summary-row.discount-row .label { color: var(--emerald); font-weight: 700; }
.summary-row.discount-row .value { color: var(--emerald); font-weight: 900; }
.summary-row.schedule-info .value { color: var(--blue-500); font-size: 12.5px; }
.summary-row.total {
    padding-top: 14px;
    margin-top: 8px;
    border-top: 2px solid var(--border);
    border-bottom: none;
    font-size: 16px;
}
.summary-row.total .label { color: var(--navy-900); font-weight: 800; }
.summary-row.total .value { font-size: 20px; color: var(--gold-500); font-weight: 900; }

/* ================= BENEFITS CARD ================= */
.benefits-card {
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
}
.benefits-card::before {
    content: '';
    position: absolute;
    top: -50%; right: -30%;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.3), transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
}
.benefits-card > * { position: relative; z-index: 2; }
.benefits-card h3 {
    font-size: 15px; font-weight: 900;
    margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}
.benefits-card h3 .icon { color: var(--gold-400); }
.benefit-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 8px 0;
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
}
.benefit-item i { color: var(--emerald-500); font-size: 14px; margin-top: 3px; flex-shrink: 0; }

/* ================= MODAL ================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 31, 68, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal {
    background: #fff;
    border-radius: 22px;
    max-width: 440px;
    width: 100%;
    padding: 32px 26px 26px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0,0,0,0.35);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}
.modal-overlay.show .modal { transform: scale(1) translateY(0); }
.modal::before {
    content: '';
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
}
.modal.success::before { background: linear-gradient(90deg, var(--emerald-500), #34D399); }
.modal-icon {
    width: 72px; height: 72px;
    margin: 0 auto 18px;
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 34px;
    color: var(--gold-500);
    animation: modalIconIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal.success .modal-icon { background: linear-gradient(135deg, #D1FAE5, #A7F3D0); color: var(--emerald); }
@keyframes modalIconIn {
    0% { transform: scale(0) rotate(-45deg); }
    100% { transform: scale(1) rotate(0); }
}
.modal h3 { font-size: 19px; font-weight: 900; color: var(--navy-900); margin-bottom: 10px; line-height: 1.5; }
.modal p { font-size: 14px; color: var(--text-muted); line-height: 1.9; margin-bottom: 22px; white-space: pre-line; }
.btn-modal {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    color: #fff;
    border-radius: 12px;
    font-size: 15px; font-weight: 800;
}
.modal.success .btn-modal { background: linear-gradient(135deg, var(--emerald-500), var(--emerald)); }

/* ================= TOAST ================= */
.toast-container {
    position: fixed;
    bottom: 24px; left: 24px;
    z-index: 10000;
    display: flex; flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    background: var(--navy-900);
    color: #fff;
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    font-size: 14px; font-weight: 600;
    display: flex; align-items: center; gap: 10px;
    min-width: 260px;
    max-width: 360px;
    animation: toastIn 0.3s ease;
    pointer-events: auto;
    border-right: 4px solid var(--gold-500);
}
.toast.success { border-right-color: var(--emerald); }
.toast.error { border-right-color: var(--red-500); }
.toast i { font-size: 18px; }
@keyframes toastIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ================= FOOTER ================= */
.site-footer {
    background: var(--navy-900);
    color: rgba(255,255,255,0.7);
    padding: 30px 0 20px;
    text-align: center;
    font-size: 13.5px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.site-footer a { color: var(--gold-400); }

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
    .form-layout { grid-template-columns: 1fr; }
    .summary-sidebar { position: static; }
    .stepper { display: none; }
    .mobile-progress { display: block; }
    .form-main { padding: 24px; }
}
@media (max-width: 640px) {
    .main-container { padding: 0 14px; margin-top: -40px; }
    .page-hero { padding: 36px 0 70px; }
    .page-hero h1 { font-size: 1.5rem; }
    .form-main { padding: 20px 16px; }
    .form-row { grid-template-columns: 1fr; }
    .form-actions { flex-direction: column-reverse; }
    .btn { width: 100%; }
    .summary-card { padding: 20px 16px; }
    .payment-methods { grid-template-columns: 1fr; }
    .toast-container { left: 12px; right: 12px; bottom: 12px; }
    .toast { min-width: auto; }

    .selected-lawyer-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .selected-lawyer-info .label-row { justify-content: center; }
    .selected-lawyer-info h3 { justify-content: center; }
    .selected-lawyer-info .title-text { justify-content: center; }
    .btn-change-lawyer { width: 100%; justify-content: center; }

    .selected-service-card {
        flex-direction: column;
        text-align: center;
        padding: 18px;
    }
    .selected-service-price {
        border-right: none;
        border-top: 1px dashed var(--border);
        padding-right: 0;
        padding-top: 12px;
        width: 100%;
        text-align: center;
    }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
