/* ==========================================================================
   Truffle India Super Admin Theme Stylesheet
   Exact Match to spradmin.truffleindia.xceltec.in (Orange + White + Dark Sidebar)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Caveat:wght@700&display=swap');

:root {
    --truffle-orange: #FF5100;
    --truffle-orange-hover: #E04700;
    --truffle-orange-light: #FFF0EB;
    --truffle-dark-bg: #180D09;
    --truffle-dark-sidebar: #1C0F0A;
    --truffle-body-bg: #F4F5F8;
    --truffle-card-bg: #FFFFFF;
    --truffle-text-dark: #212529;
    --truffle-text-muted: #888888;
    --truffle-border-color: #EBF0F5;
    --truffle-shadow: 0px 4px 20px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

body {
    background-color: var(--truffle-body-bg);
    color: var(--truffle-text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --------------------------------------------------------------------------
   Top Navigation Header (Matching spradmin.truffleindia.xceltec.in)
   -------------------------------------------------------------------------- */
.truffle-navbar {
    background-color: var(--truffle-dark-bg);
    padding: clamp(0.75rem, 2vw, 1.1rem) clamp(1rem, 4vw, 2.5rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-bottom: 3px solid var(--truffle-orange);
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Truffle Burger Swirl Logo */
.truffle-logo-emblem {
    display: flex;
    align-items: center;
    gap: 12px;
}

.truffle-logo-icon {
    width: 44px;
    height: 44px;
    background: #FF5100;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 81, 0, 0.4);
}

.truffle-logo-text {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.truffle-logo-title {
    color: #FF5100;
    font-size: clamp(24px, 4vw, 30px);
    font-weight: 800;
    font-family: 'Caveat', 'Poppins', cursive, sans-serif;
    letter-spacing: 0.5px;
    line-height: 1;
}

.truffle-logo-sub {
    color: #ffffff;
    font-size: clamp(14px, 3vw, 16px);
    font-weight: 700;
    letter-spacing: -0.3px;
}

.brand-badge {
    background: rgba(255, 81, 0, 0.15);
    color: var(--truffle-orange);
    border: 1px solid rgba(255, 81, 0, 0.3);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --------------------------------------------------------------------------
   Wizard Progress Steps Bar (Orange Theme)
   -------------------------------------------------------------------------- */
.wizard-progress-bar {
    background: #ffffff;
    border-bottom: 1px solid var(--truffle-border-color);
    padding: clamp(1rem, 3vw, 1.5rem) clamp(1rem, 4vw, 2rem);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.steps-wrapper {
    max-width: 950px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    position: relative;
}

.steps-wrapper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50px;
    right: 50px;
    height: 4px;
    background-color: #EBF0F5;
    border-radius: 2px;
    z-index: 1;
}

.step-item {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background-color: #ffffff;
    padding: 0 12px;
}

.step-number {
    width: clamp(32px, 8vw, 40px);
    height: clamp(32px, 8vw, 40px);
    border-radius: 50%;
    background-color: #ffffff;
    border: 2px solid #EBF0F5;
    color: #A0A0A0;
    font-weight: 700;
    font-size: clamp(13px, 3vw, 15px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.step-item.active .step-number {
    border-color: var(--truffle-orange);
    background-color: var(--truffle-orange);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 81, 0, 0.4);
    transform: scale(1.08);
}

.step-item.completed .step-number {
    border-color: #28a745;
    background-color: #28a745;
    color: #ffffff;
}

.step-label {
    font-size: clamp(12px, 2.5vw, 13px);
    font-weight: 600;
    color: #A0A0A0;
}

.step-item.active .step-label {
    color: var(--truffle-orange);
    font-weight: 700;
}

.step-item.completed .step-label {
    color: #28a745;
}

/* --------------------------------------------------------------------------
   Main Content & Card Styling
   -------------------------------------------------------------------------- */
.content-container {
    max-width: 820px;
    width: 100%;
    margin: 2rem auto 0rem;
    padding: 0 clamp(1rem, 3vw, 1.5rem);
    flex: 1;
}

.truffle-card {
    background: var(--truffle-card-bg);
    border-radius: 16px;
    box-shadow: var(--truffle-shadow);
    border: 1px solid var(--truffle-border-color);
    padding: clamp(1.25rem, 5vw, 2.75rem);
    position: relative;
    overflow: hidden;
}

.truffle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--truffle-orange), #FF8800);
}

.card-header-title {
    font-size: clamp(21px, 5vw, 26px);
    font-weight: 700;
    color: var(--truffle-orange);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.card-subtitle {
    font-size: clamp(13px, 3vw, 14px);
    color: #777777;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Form Controls & Buttons (Super Admin Orange Style)
   -------------------------------------------------------------------------- */
.form-group {
    margin-bottom: clamp(2rem, 4vw, 1.75rem);
}

.form-label {
    display: block;
    font-size: clamp(12px, 2.5vw, 13px);
    font-weight: 700;
    color: var(--truffle-orange);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control-solid {
    width: 100%;
    padding: clamp(12px, 3vw, 15px) clamp(16px, 4vw, 20px);
    font-size: clamp(13px, 3vw, 15px);
    font-weight: 500;
    border: 1.5px solid #F0F2F5;
    border-radius: 10px;
    background-color: #F8F9FA;
    color: var(--truffle-text-dark);
    transition: all 0.25s ease;
    outline: none;
}

.form-control-solid:focus {
    border-color: var(--truffle-orange);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 81, 0, 0.15);
}

.form-control-solid.is-invalid {
    border-color: #FF0000;
    background-color: #fff8f8;
}

.form-control-solid.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.15);
}

.invalid-feedback {
    color: #FF0000;
    font-size: clamp(12px, 2.5vw, 13px);
    font-weight: 600;
    margin-top: 6px;
}

.text-danger {
    color: #FF0000;
}

/* OTP Input Boxes */
.otp-inputs {
    display: flex;
    gap: clamp(4px, 2vw, 14px);
    justify-content: center;
    margin: clamp(1.5rem, 4vw, 2rem) 0;
}

.otp-box {
    width: 58px;
    height: 64px;
    font-size: clamp(21px, 5vw, 26px);
    font-weight: 800;
    text-align: center;
    border: 2px solid #E4E6EF;
    border-radius: 12px;
    background-color: #F8F9FA;
    color: var(--truffle-orange);
    outline: none;
    transition: all 0.25s ease;
}

.otp-box:focus {
    border-color: var(--truffle-orange);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 81, 0, 0.2);
    transform: translateY(-2px);
}

/* Primary Orange Button */
.btn-primary-truffle {
    width: 100%;
    padding: clamp(12px, 3vw, 15px) clamp(20px, 5vw, 26px);
    font-size: clamp(14px, 3vw, 16px);
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #FF5100 0%, #E04700 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(255, 81, 0, 0.35);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.btn-primary-truffle:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 81, 0, 0.45);
    background: linear-gradient(135deg, #E04700 0%, #C43E00 100%);
}

.btn-secondary-truffle {
    padding: clamp(12px, 3vw, 12px) clamp(16px, 4vw, 22px);
    font-size: clamp(13px, 3vw, 15px);
    font-weight: 600;
    color: #666666;
    background-color: #F4F5F8;
    border: 1.5px solid #EBF0F5;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-secondary-truffle:hover {
    background-color: #E2E6EA;
    color: var(--truffle-text-dark);
}

/* --------------------------------------------------------------------------
   Info Sections & Metric Cards (Matching Super Admin)
   -------------------------------------------------------------------------- */
.info-section {
    background-color: #FAFBFD;
    border-radius: 12px;
    padding: clamp(1.25rem, 4vw, 1.75rem);
    margin-bottom: clamp(2rem, 4vw, 2rem);
    border: 1px solid var(--truffle-border-color);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #EBF0F5;
    font-size: clamp(13px, 3vw, 14.5px);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #777777;
    font-weight: 500;
}

.info-value {
    color: var(--truffle-text-dark);
    font-weight: 700;
}

.badge-success-truffle {
    background-color: #E6F9ED;
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
    padding: 5px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
}

/* Progress bar line matching dashboard */
.orange-progress-line {
    height: 4px;
    background-color: #EBF0F5;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.orange-progress-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 65%;
    background-color: var(--truffle-orange);
    border-radius: 2px;
}

/* Features List */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(12px, 2.5vw, 13.5px);
    color: var(--truffle-text-dark);
    font-weight: 600;
    background: #ffffff;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #EBF0F5;
}

.feature-item svg {
    color: var(--truffle-orange);
    flex-shrink: 0;
}


/* Terms Box */
.terms-scroll-box {
    max-height: 60vh;
    min-height: 300px;
    overflow-y: auto;
    padding: clamp(1rem, 3vw, 1.25rem);
    background-color: #FAFBFD;
    border: 1.5px solid #EBF0F5;
    border-radius: 10px;
    font-size: clamp(12px, 2.5vw, 13.5px);
    line-height: 1.7;
    color: #444444;
    margin-bottom: clamp(1.25rem, 4vw, 1.75rem);
}

.terms-scroll-box h4 {
    margin: 14px 0 6px 0;
    color: var(--truffle-orange);
    font-size: clamp(13px, 3vw, 15px);
    font-weight: 700;
}

/* Canvas Signature Pad */
.signature-container {
    border: 2px dashed var(--truffle-orange);
    border-radius: 12px;
    background-color: #ffffff;
    padding: 12px;
    text-align: center;
    margin-bottom: clamp(1.25rem, 4vw, 1.75rem);
    position: relative;
}

canvas#sig-canvas {
    width: 100%;
    height: 170px;
    border-radius: 8px;
    cursor: crosshair;
    touch-action: none;
    background: #FAFBFD;
}

.sig-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.sig-hint {
    font-size: 12px;
    color: #777777;
    font-weight: 500;
}

/* Checkbox */
.custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: clamp(1.25rem, 4vw, 1.75rem);
    font-size: clamp(12px, 2.5vw, 13.5px);
    color: var(--truffle-text-dark);
    font-weight: 500;
    cursor: pointer;
}

.custom-checkbox input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--truffle-orange);
}

/* Success Confirmation Screen */
.success-icon-wrapper {
    width: 90px;
    height: 90px;
    background-color: var(--truffle-orange-light);
    color: var(--truffle-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.75rem auto;
    box-shadow: 0 0 25px rgba(255, 81, 0, 0.25);
}

.success-icon-wrapper svg {
    width: 48px;
    height: 48px;
}

/* Footer (Matching spradmin footer) */
.truffle-footer {
    text-align: center;
    padding: clamp(1.25rem, 4vw, 1.75rem);
    font-size: clamp(12px, 2.5vw, 13px);
    color: #777777;
    font-weight: 500;
}

.truffle-footer a {
    color: var(--truffle-orange);
    text-decoration: none;
    font-weight: 600;
}


/* Responsive Icons */
.btn-primary-truffle svg, .btn-secondary-truffle svg {
    width: clamp(18px, 4vw, 20px) !important;
    height: clamp(18px, 4vw, 20px) !important;
}
.success-icon-wrapper svg {
    width: clamp(36px, 8vw, 48px) !important;
    height: clamp(36px, 8vw, 48px) !important;
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */

/* Laptop & Tablet Landscape */
@media (max-width: 1024px) {
    .wizard-progress-bar { padding: 1.25rem 1.5rem; }
    .content-container { padding: 0 1rem; }
    .truffle-card { padding: 2.25rem 2rem; }
}

/* Tablet Portrait */
@media (max-width: 768px) {
    .truffle-navbar {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    .truffle-navbar > div:last-child {
        align-self: flex-start;
    }
    .steps-wrapper::before {
        left: 20px;
        right: 20px;
    }
    .step-label {
        font-size: 11px;
        text-align: center;
        line-height: 1.3;
    }
    .otp-box {
        width: 48px;
        height: 56px;
        font-size: 22px;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .info-row .info-value {
        text-align: left !important;
        max-width: 100% !important;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .truffle-navbar {
        padding: 0.75rem 1rem;
        align-items: center;
    }
    .truffle-navbar > div:last-child {
        align-self: center;
    }
    .brand-container {
        display: flex;
        flex-direction: row !important;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 8px;
    }

    .brand-logo {
        flex: 0 0 auto;
    }

    .brand-right {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        text-align: right;
        min-width: 0;
        gap: 4px;
    }

    .brand-right .contract-portal {
        white-space: nowrap;
        font-size: 10px;
    }

    .brand-right .support-email {
        font-size: 9px;
        white-space: nowrap;
    }

    .brand-logo img {
        max-width: 100px;
        height: auto;
    }
    .brand-container {
        /* flex-direction: column; */
        /* gap: 70px; */
    }
    .brand-badge {
        margin-left: 0 !important;
    }
    .wizard-progress-bar {
        padding: 1rem;
    }
    .step-label {
        display: none; /* Hide labels on very small screens to fit the steps */
    }
    .steps-wrapper::before {
        left: 15px;
        right: 15px;
    }
    .step-item {
        padding: 0 5px;
    }
    .truffle-card {
        padding: 1.5rem 1.25rem;
    }
    .card-header-title {
        font-size: 22px;
    }
    .otp-inputs {
        gap: 6px;
    }
    .otp-box {
        width: 40px;
        height: 48px;
        font-size: 18px;
    }
    .btn-primary-truffle {
        padding: 12px 20px;
        font-size: clamp(13px, 3vw, 15px);
    }
    .btn-secondary-truffle {
        padding: 12px 16px;
        font-size: clamp(13px, 3vw, 14px);
    }
    /* Fix inline flex containers in forms */
    form > div[style*="display: flex"] {
        flex-direction: column-reverse;
        gap: 12px !important;
    }
    form > div[style*="display: flex"] > * {
        width: 100%;
        flex: none !important;
    }
    .success-icon-wrapper {
        width: 70px;
        height: 70px;
    }
    .success-icon-wrapper svg {
        width: 36px;
        height: 36px;
    }
}

/* Very Small Mobile */
@media (max-width: 360px) {
    .otp-inputs {
        gap: 4px;
    }
    .otp-box {
        width: 34px;
        height: 42px;
        font-size: clamp(14px, 3vw, 16px);
    }
    .step-number {
        width: 32px;
        height: 32px;
        font-size: clamp(12px, 2.5vw, 13px);
    }
    .steps-wrapper::before {
        top: 16px;
    }
}
