/* Common Body Styles */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
}

/* === LOGIN PAGE CSS === */
.body-login {
    background-color: #f8f9fa;
    padding: 0;
    overflow-x: hidden;
}

.split-layout {
    display: flex;
    min-height: 100vh;
}

/* Left Side: Exactly 40% with the dummy image */
.image-side {
    width: 40%;
    background-image: url('../bg.png');
    /* Relative to assets folder */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: none;
    /* Hidden on very small screens, displayed on larger ones */
}

/* Overlay for the image to make it look sleeker */
.image-side::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.6) 100%);
}

/* Right Side: 60% for the login form */
.form-side {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: #ffffff;
}

@media (min-width: 992px) {
    .image-side {
        display: block;
    }

    .form-side {
        width: 60%;
    }
}

/* Login Card Styling */
.login-card {
    width: 100%;
    max-width: 420px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card h2 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1a1d20;
    letter-spacing: -0.5px;
}

.login-card p {
    color: #6c757d;
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Form Control Customization */
.form-control {
    padding: 0.8rem 1.2rem;
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    font-size: 1rem;
    transition: all 0.2s ease-in-out;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

/* Button Customization (Login) */
.btn-primary {
    padding: 0.8rem 1.2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    width: 100%;
    margin-top: 1rem;
    background-color: #0d6efd;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(13, 110, 253, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(13, 110, 253, 0.3);
}

/* Utility links */
.form-check-label {
    font-size: 0.95rem;
    color: #6c757d;
    cursor: pointer;
}

.forgot-password {
    font-size: 0.95rem;
    text-decoration: none;
    font-weight: 500;
    color: #0d6efd;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #0a58ca;
    text-decoration: underline;
}

.hover-primary {
    transition: color 0.2s ease;
}

.hover-primary:hover {
    color: #0d6efd !important;
}

/* === OTP PAGE CSS === */
.body-otp {
    background-color: #f4f7f6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.otp-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 40px 30px;
    max-width: 450px;
    width: 100%;
    text-align: center;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.icon-container {
    width: 65px;
    height: 65px;
    background-color: #eef2ff;
    color: #4f46e5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.15);
}

.otp-card h3 {
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
    font-size: 1.5rem;
}

.otp-card p {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 30px;
    line-height: 1.5;
}

.otp-input-group {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 30px;
}

.otp-input {
    width: 50px;
    height: 60px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background-color: #f9fafb;
    color: #111827;
    transition: all 0.2s ease-in-out;
    padding: 0;
}

.otp-input:focus {
    outline: none;
    border-color: #4f46e5;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    transform: scale(1.05);
}

.btn-verify {
    background-color: #4f46e5;
    border: none;
    color: white;
    font-weight: 600;
    padding: 14px;
    border-radius: 10px;
    width: 100%;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-verify:hover:not(:disabled) {
    background-color: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-verify:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.resend-text {
    margin-top: 25px;
    font-size: 0.95rem;
    color: #6b7280;
}

.resend-link {
    color: #4f46e5;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.resend-link:hover {
    color: #3730a3;
    text-decoration: underline;
}

/* Shake Animation for Error */
.shake {
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Responsive Adjustments */
@media (max-width: 400px) {
    .otp-input {
        width: 42px;
        height: 52px;
        font-size: 20px;
        border-radius: 8px;
    }

    .otp-card {
        padding: 30px 20px;
    }

    .otp-input-group {
        gap: 5px;
    }
}

/* === DASHBOARD PAGE CSS === */
:root {
    --sidebar-width: 260px;
    --sidebar-bg: #ffffff;
    /* Clean professional white */
    --sidebar-hover: #f8fafc;
    /* Soft slate hover */
    --sidebar-text: #64748b;
    /* Professional slate gray */
    --sidebar-active-text: #0ea5e9;
    /* Professional blue */
    --sidebar-active-bg: #f0f9ff;
    /* Soft blue highlight */
    --sidebar-border: #e2e8f0;
    /* Subtle border */

    --header-height: 70px;
    --bg-color: #f4f7fa;
    /* Clean background */
    --card-border: #e2e8f0;
    /* Soft cool border */
}

.body-dashboard {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: #334155;
    overflow-x: hidden;
}

/* === SIDEBAR === */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.04);
    border-right: 1px solid var(--sidebar-border);
    transform: translateX(-100%);
    /* Hidden by default on all screens */
}

/* When shown, slide it in */
.sidebar.show {
    transform: translateX(0);
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    /* Dark professional brand text */
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-nav {
    padding: 20px 0;
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom Scrollbar for Sidebar */
.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--sidebar-hover);
    border-radius: 5px;
}

.nav-item {
    padding: 0 16px;
    margin-bottom: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    color: var(--sidebar-text);
    padding: 10px 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: var(--sidebar-hover);
    color: #334155;
}

.nav-link.active {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    font-weight: 600;
    border-right: 3px solid var(--sidebar-active-text);
    border-radius: 8px 0 0 8px;
    /* Flat right edge for active state border */
}

.nav-link i {
    font-size: 1.2rem;
    min-width: 28px;
    text-align: center;
}

/* Dropdown specific styles */
.nav-link.dropdown-toggle::after {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.nav-link[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.sub-menu {
    padding-left: 36px;
    padding-top: 5px;
    padding-bottom: 5px;
}

.sub-nav-link {
    display: block;
    color: var(--sidebar-text);
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    position: relative;
}

.sub-nav-link::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #cbd5e1;
    transition: all 0.2s ease;
}

.sub-nav-link:hover {
    color: var(--sidebar-active-text);
    background-color: var(--sidebar-hover);
}

.sub-nav-link:hover::before {
    background-color: var(--sidebar-active-text);
}

.nav-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 600;
    margin: 20px 0 10px 24px;
    white-space: nowrap;
}

/* === MAIN CONTENT === */
.main-content {
    margin-left: 0;
    /* Full width, no shift */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Sidebar Overlay for all screens */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    z-index: 1035;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* === HEADER === */
.top-header {
    height: var(--header-height);
    background-color: #ffffff;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.toggle-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-btn:hover {
    color: #0f172a;
}

.search-bar {
    position: relative;
    width: 350px;
    margin-left: 20px;
}

.search-bar i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.search-bar input {
    padding-left: 40px;
    border-radius: 8px;
    background-color: #f1f5f9;
    border: 1px solid transparent;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.search-bar input:focus {
    background-color: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 0 0 4px rgba(241, 245, 249, 1);
}

/* === CARDS === */
.content-wrapper {
    padding: 30px;
    flex-grow: 1;
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 11px;
        flex-grow: 1;
    }
}

.pro-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    height: 100%;
}

.stat-card {
    padding: 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.stat-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* === TABLES === */
.table-custom {
    margin-bottom: 0;
}

.table-custom th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border-bottom: 1px solid var(--card-border);
    padding: 16px 24px;
    font-weight: 600;
    background-color: #f8fafc;
}

.table-custom th:first-child {
    border-top-left-radius: 12px;
}

.table-custom th:last-child {
    border-top-right-radius: 12px;
}

.table-custom td {
    padding: 16px 24px;
    vertical-align: middle;
    color: #334155;
    border-bottom: 1px solid var(--card-border);
    font-size: 0.9rem;
}

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

.badge-success {
    background-color: #dcfce7;
    color: #166534;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
}

/* === RESPONSIVE === */
@media (max-width: 991.98px) {
    .search-bar {
        display: none;
    }
}



/* == Add Partner Modal CSS == */
#addPartnerModal .modal-content,
#addCustomerModal .modal-content {
    border-radius: 24px;
    overflow: hidden;
}

#addPartnerModal .modal-header,
#addCustomerModal .modal-header {
    background: linear-gradient(135deg, #0d6efd, #3c8dff);
    padding: 22px 24px;
}

#addPartnerModal .modal-title,
#addCustomerModal .modal-title {
    color: white;
    font-size: 24px;
}

#addPartnerModal .btn-close,
#addCustomerModal .btn-close {
    filter: brightness(0) invert(1);
}

#addPartnerModal .modal-body,
#addCustomerModal .modal-body {
    padding: 30px;
    background: #f8fafc;
}

#addPartnerModal .form-label,
#addCustomerModal .form-label {
    font-weight: 600;
    color: #5f6b7a;
    margin-bottom: 8px;
}

#addPartnerModal .form-control,
#addCustomerModal .form-control {
    height: 52px;
    border-radius: 14px;
    border: 1px solid #dce3ea;
    padding-left: 14px;
    font-size: 15px;
    transition: 0.3s ease;
    background: #fff;
}

#addPartnerModal .form-control:focus,
#addCustomerModal .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.12);
}

#addPartnerModal .input-group-text,
#addCustomerModal .input-group-text {
    background: white;
    border-radius: 14px 0 0 14px;
    border: 1px solid #dce3ea;
    border-right: 0;
}

#addPartnerModal .input-group .form-control,
#addCustomerModal .input-group .form-control {
    border-left: 0;
    padding-left: 0;
}

#addPartnerModal .section-box,
#addCustomerModal .section-box {
    background: white;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    margin-bottom: 25px;
}


#addPartnerModal .input-group,
#addCustomerModal .input-group {
    border: 1px solid #dce3ea;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    transition: 0.3s ease;
}

#addPartnerModal .input-group:focus-within,
#addCustomerModal .input-group:focus-within {
    border-color: #0d6efd;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.12);
}

#addPartnerModal .input-group-text,
#addCustomerModal .input-group-text {
    background: #fff;
    border: none !important;
    padding-left: 16px;
    padding-right: 10px;
}

#addPartnerModal .input-group .form-control,
#addCustomerModal .input-group .form-control {
    border: none !important;
    box-shadow: none !important;
    height: 52px;
    padding-left: 0;
}

#addPartnerModal .input-group .form-control:focus,
#addCustomerModal .input-group .form-control:focus {
    box-shadow: none !important;
}

#addPartnerModal .custom-btn,
#addCustomerModal .custom-btn {
    width: auto !important;
    min-width: 170px;
    height: 50px;
    border-radius: 14px;
    font-weight: 600;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#addPartnerModal .modal-footer .btn,
#addCustomerModal .modal-footer .btn {
    flex: unset !important;
}