/**
 * PenoCRM customer light theme.
 * Keeps the portal bright and modern while preserving existing Bootstrap layouts.
 */
:root {
    --peno-bg: #f5f7fb;
    --peno-surface: #ffffff;
    --peno-text: #172033;
    --peno-muted: #667085;
    --peno-border: #e4e9f2;
    --peno-primary: #5b5ce2;
    --peno-primary-dark: #4647c8;
    --peno-accent: #22c7a9;
    --peno-shadow: 0 24px 70px rgba(32, 42, 74, .12);
}

body.customers {
    min-height: 100vh;
    color: var(--peno-text);
    background-color: var(--peno-bg);
}

body.customers #wrapper,
body.customers #content {
    width: 100%;
    background-color: transparent;
}

body.customers .panel_s,
body.customers .panel,
body.customers .table-responsive,
body.customers .well {
    border-color: var(--peno-border);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(32, 42, 74, .06);
}

body.customers .panel-body,
body.customers .panel_s,
body.customers .well,
body.customers .dropdown-menu {
    background: var(--peno-surface);
}

body.customers .btn-primary {
    border-color: var(--peno-primary);
    color: #fff;
    background: linear-gradient(135deg, #6869ea 0%, var(--peno-primary) 55%, #4c4dd1 100%);
    box-shadow: 0 8px 18px rgba(91, 92, 226, .2);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

body.customers .btn-primary:hover,
body.customers .btn-primary:focus {
    border-color: var(--peno-primary-dark);
    color: #fff;
    background: linear-gradient(135deg, #595ad9 0%, var(--peno-primary-dark) 100%);
    box-shadow: 0 10px 22px rgba(70, 71, 200, .26);
    transform: translateY(-1px);
}

body.customers .btn-primary:active,
body.customers .btn-primary.active {
    color: #fff;
    background: var(--peno-primary-dark);
    box-shadow: 0 3px 9px rgba(70, 71, 200, .22);
    transform: translateY(0);
}

body.customers .btn-primary[disabled],
body.customers .btn-primary.disabled {
    border-color: #a9aaf1;
    color: rgba(255, 255, 255, .92);
    background: #a9aaf1;
    box-shadow: none;
    opacity: 1;
}

/**
 * Customer dashboard shell.
 * Adds a calm light workspace while retaining the existing Bootstrap grid and
 * permission-driven dashboard sections rendered by the CRM.
 */
body.customers:not(.customers_login) {
    background:
        radial-gradient(circle at 8% 4%, rgba(91, 92, 226, .08), transparent 22rem),
        radial-gradient(circle at 94% 22%, rgba(34, 199, 169, .07), transparent 24rem),
        var(--peno-bg);
}

body.customers:not(.customers_login) #content {
    min-height: calc(100vh - 132px);
    padding: 34px 0 56px;
}

/* Light portal footer: content-sized, responsive and visually separate from the page. */
body.customers > .footer,
body.customers .footer {
    width: 100%;
    height: auto;
    min-height: 76px;
    margin: 0;
    padding: 0;
    border: 0;
    border-top: 1px solid rgba(218, 225, 237, .9);
    color: var(--peno-muted);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 -10px 32px rgba(32, 42, 74, .035);
}

body.customers .customer-footer-inner {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0;
}

body.customers .customer-footer-copyright,
body.customers .customer-footer-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.customers .customer-footer-mark {
    display: inline-grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 1px solid rgba(91, 92, 226, .14);
    border-radius: 11px;
    color: var(--peno-primary);
    background: #f0f0ff;
    place-items: center;
}

body.customers .copyright-footer {
    color: #667085;
    font-size: 13px;
    line-height: 1.7;
}

body.customers .customer-footer-links:empty {
    display: none;
}

body.customers .customer-footer-links a {
    padding: 7px 11px;
    border-radius: 9px;
    color: #59657a;
    font-size: 12px;
    font-weight: 650;
    transition: color .2s ease, background-color .2s ease;
}

body.customers .customer-footer-links a:hover,
body.customers .customer-footer-links a:focus {
    color: var(--peno-primary);
    background: #f0f0ff;
}

/* Registration page uses a clean white card and an unambiguous primary action. */
body.customers #register-form {
    margin-bottom: 36px;
}

body.customers .register-heading {
    margin-top: 23px;
    color: var(--peno-text);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.02em;
}

body.customers #register-form > .panel_s {
    overflow: hidden;
    border: 1px solid rgba(218, 225, 237, .95);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(32, 42, 74, .08);
}

body.customers #register-form > .panel_s > .panel-body {
    padding: 32px;
    background: #fff;
}

body.customers #register-form .register-contact-info-heading,
body.customers #register-form .register-company-info-heading {
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--peno-border);
    color: #29324a;
    font-size: 17px;
}

body.customers #register-form .control-label {
    margin-bottom: 7px;
    color: #475467;
    font-size: 13px;
    font-weight: 650;
}

body.customers #register-form .form-control,
body.customers #register-form .bootstrap-select > .dropdown-toggle {
    min-height: 44px;
    border: 1px solid #dce2ec;
    border-radius: 11px;
    color: var(--peno-text);
    background-color: #fbfcfe;
    box-shadow: none;
}

body.customers #register-form .form-control:focus,
body.customers #register-form .bootstrap-select.open > .dropdown-toggle {
    border-color: var(--peno-primary);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(91, 92, 226, .09);
}

body.customers #register-form > .panel_s > .panel-footer {
    display: flex;
    min-height: 84px;
    align-items: center;
    justify-content: flex-end;
    padding: 18px 32px;
    border-top: 1px solid var(--peno-border);
    border-radius: 0;
    background: #f8f9fd;
}

body.customers #register-form > .panel_s > .panel-footer .btn-primary {
    min-width: 150px;
    min-height: 48px;
    padding: 12px 26px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 750;
}

body.customers .navbar.header {
    min-height: 72px;
    margin: 0;
    border: 0;
    border-bottom: 1px solid rgba(228, 233, 242, .85);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 30px rgba(32, 42, 74, .05);
}

body.customers .navbar.header .navbar-brand {
    display: flex;
    height: 72px;
    align-items: center;
    padding-block: 15px;
}

body.customers .navbar.header .navbar-brand img {
    max-height: 42px;
}

body.customers .navbar.header .navbar-nav > li > a {
    margin: 14px 3px;
    padding: 12px 14px;
    border-radius: 11px;
    color: #475467;
    font-size: 13px;
    font-weight: 650;
    transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

body.customers .navbar.header .navbar-nav > li > a:hover,
body.customers .navbar.header .navbar-nav > li > a:focus,
body.customers .navbar.header .navbar-nav > li.active > a {
    color: var(--peno-primary);
    background: rgba(91, 92, 226, .08);
    transform: translateY(-1px);
}

body.customers .navbar.header .client-profile-image-small {
    width: 34px;
    height: 34px;
    border: 2px solid #fff;
    border-radius: 12px;
    box-shadow: 0 0 0 2px rgba(91, 92, 226, .14);
    object-fit: cover;
}

body.customers .customer-top-submenu {
    display: flex;
    width: max-content;
    max-width: 100%;
    gap: 6px;
    margin: 0 0 22px;
    padding: 6px;
    overflow-x: auto;
    border: 1px solid var(--peno-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 8px 24px rgba(32, 42, 74, .04);
}

body.customers .customer-top-submenu > li > a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 9px 14px;
    border: 0;
    border-radius: 10px;
    color: var(--peno-muted);
    font-size: 13px;
    font-weight: 650;
}

body.customers .customer-top-submenu > li > a:hover,
body.customers .customer-top-submenu > li.active > a {
    color: var(--peno-primary);
    background: rgba(91, 92, 226, .08);
}

body.customers .section-client-dashboard > #greeting {
    position: relative;
    margin: 0 0 28px;
    padding: 30px 32px;
    overflow: hidden;
    border: 1px solid rgba(91, 92, 226, .12);
    border-radius: 22px;
    color: #20214f;
    background: linear-gradient(135deg, #fff 0%, #f2f2ff 58%, #ebfbf7 100%);
    box-shadow: 0 18px 48px rgba(32, 42, 74, .08);
    font-size: clamp(23px, 3vw, 32px);
    line-height: 1.35;
}

body.customers .section-client-dashboard > #greeting::after {
    position: absolute;
    width: 180px;
    height: 180px;
    content: '';
    inset: -82px auto auto -52px;
    border: 28px solid rgba(91, 92, 226, .06);
    border-radius: 50%;
    pointer-events: none;
}

body.customers .section-client-dashboard .projects-summary-heading,
body.customers .section-client-dashboard .invoices-quick-info-heading {
    margin-top: 30px !important;
    color: var(--peno-text) !important;
    font-size: 18px !important;
    font-weight: 750 !important;
    letter-spacing: -.01em;
}

body.customers .section-client-dashboard .panel_s {
    overflow: hidden;
    border: 1px solid rgba(228, 233, 242, .92);
    border-radius: 18px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 12px 36px rgba(32, 42, 74, .065);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

body.customers .section-client-dashboard .panel_s:hover {
    border-color: rgba(91, 92, 226, .2);
    box-shadow: 0 18px 44px rgba(32, 42, 74, .09);
    transform: translateY(-2px);
}

body.customers .section-client-dashboard .panel-body {
    padding: 24px;
}

body.customers .section-client-dashboard hr {
    border-color: var(--peno-border);
}

body.customers .section-client-dashboard .form-control {
    min-height: 42px;
    border-color: var(--peno-border);
    border-radius: 11px;
    background-color: #fbfcfe;
    box-shadow: none;
}

body.customers .section-client-dashboard .form-control:focus {
    border-color: var(--peno-primary);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(91, 92, 226, .09);
}

body.customers .section-client-dashboard a:not(.btn) {
    color: var(--peno-primary);
    font-weight: 650;
}

body.customers .section-client-dashboard canvas {
    margin-top: 8px;
}

@media (max-width: 767px) {
    body.customers:not(.customers_login) #content {
        padding: 22px 0 40px;
    }

    body.customers .navbar.header {
        min-height: 64px;
    }

    body.customers .navbar.header .navbar-brand {
        height: 64px;
    }

    body.customers .navbar.header .navbar-toggle {
        margin-top: 15px;
        border-color: var(--peno-border);
        border-radius: 10px;
    }

    body.customers .navbar.header .navbar-collapse {
        border-color: var(--peno-border);
        background: #fff;
    }

    body.customers .navbar.header .navbar-nav > li > a {
        margin: 3px 8px;
    }

    body.customers .section-client-dashboard > #greeting {
        margin-bottom: 22px;
        padding: 24px 22px;
        border-radius: 18px;
        font-size: 23px;
    }

    body.customers .section-client-dashboard .panel-body {
        padding: 18px;
    }

    body.customers .customer-footer-inner {
        min-height: 0;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        padding: 20px 0;
        text-align: center;
    }

    body.customers .customer-footer-copyright {
        flex-direction: column;
        gap: 7px;
    }

    body.customers #register-form > .panel_s > .panel-body {
        padding: 22px 18px;
    }

    body.customers #register-form > .panel_s > .panel-footer {
        padding: 16px 18px;
    }

    body.customers #register-form > .panel_s > .panel-footer .btn-primary {
        width: 100%;
    }
}

body.customers_login #wrapper,
body.customers_login #content,
body.customers_login #content > .container,
body.customers_login #content > .container > .row {
    min-height: 100%;
}

body.customers_login #content {
    padding: 0;
}

body.customers_login #content > .container {
    width: 100%;
    padding: 0;
}

.otp-login-shell {
    display: grid;
    min-height: 100vh;
    padding: 32px;
    place-items: center;
    background:
        radial-gradient(circle at 12% 12%, rgba(91, 92, 226, .11), transparent 28%),
        radial-gradient(circle at 90% 84%, rgba(34, 199, 169, .12), transparent 28%),
        #f7f9fc;
}

.otp-login-card {
    display: grid;
    width: min(1040px, 100%);
    min-height: 640px;
    grid-template-columns: 1.05fr 1fr;
    overflow: hidden;
    border: 1px solid rgba(228, 233, 242, .9);
    border-radius: 28px;
    background: var(--peno-surface);
    box-shadow: var(--peno-shadow);
}

.otp-login-showcase {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 52px;
    color: #fff;
    background: linear-gradient(145deg, #5657dc 0%, #7071ea 55%, #4b4cca 100%);
}

.otp-login-showcase::before,
.otp-login-showcase::after {
    position: absolute;
    content: '';
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
}

.otp-login-showcase::before { width: 380px; height: 380px; inset: -120px auto auto -150px; }
.otp-login-showcase::after { width: 280px; height: 280px; inset: auto -90px -100px auto; }

.otp-brand-mark {
    position: relative;
    z-index: 1;
    display: grid;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    color: var(--peno-primary);
    background: #fff;
    box-shadow: 0 12px 30px rgba(26, 27, 104, .2);
    font-size: 25px;
    font-weight: 800;
    place-items: center;
}

.otp-showcase-copy { position: relative; z-index: 1; max-width: 390px; }
.otp-eyebrow { display: block; margin-bottom: 14px; color: #d9dafe; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.otp-showcase-copy h2 { margin: 0 0 18px; color: #fff; font-size: clamp(32px, 4vw, 48px); font-weight: 800; line-height: 1.25; }
.otp-showcase-copy p { margin: 0; color: rgba(255, 255, 255, .78); font-size: 16px; line-height: 1.9; }
.otp-security-note { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, .82); font-size: 13px; }
.otp-security-note i { display: grid; width: 34px; height: 34px; border-radius: 11px; background: rgba(255, 255, 255, .13); place-items: center; }

.otp-login-content { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 64px 68px; background: #fff; }
.otp-mobile-brand { display: none; }
.otp-language-picker { position: absolute; top: 28px; inset-inline-end: 32px; display: flex; align-items: center; gap: 9px; color: var(--peno-muted); font-size: 12px; }
.otp-language-picker label { margin: 0; }
.otp-language-picker .form-control { width: 118px; height: 36px; padding: 6px 10px; border-color: var(--peno-border); border-radius: 10px; box-shadow: none; }
.otp-login-header { margin-bottom: 34px; }
.otp-step { display: inline-flex; margin-bottom: 12px; padding: 7px 12px; border-radius: 999px; color: var(--peno-primary); background: #eeeeff; font-size: 12px; font-weight: 700; }
.otp-login-header h1 { margin: 0 0 12px; color: var(--peno-text); font-size: 30px; font-weight: 800; }
.otp-login-header p { margin: 0; color: var(--peno-muted); line-height: 1.8; }
.otp-login-form label { margin-bottom: 9px; color: #344054; font-size: 13px; font-weight: 700; }
.otp-input-wrap { position: relative; }
.otp-input-wrap > i { position: absolute; z-index: 1; top: 50%; inset-inline-start: 17px; color: #98a2b3; font-size: 17px; transform: translateY(-50%); }
.otp-input-wrap .form-control { height: 54px; padding-inline: 48px 16px; border: 1px solid var(--peno-border); border-radius: 14px; color: var(--peno-text); background: #fbfcfe; box-shadow: none; font-size: 15px; transition: border-color .2s, box-shadow .2s, background .2s; }
.otp-input-wrap .form-control:focus { border-color: var(--peno-primary); background: #fff; box-shadow: 0 0 0 4px rgba(91, 92, 226, .1); }
.otp-code-input { letter-spacing: .5em; text-align: center; font-size: 22px !important; font-weight: 800; }
.otp-remember { margin: 20px 0; color: var(--peno-muted); }
.otp-primary-action { display: flex; height: 54px; align-items: center; justify-content: center; gap: 12px; margin-top: 22px; border-radius: 14px; font-size: 15px; font-weight: 700; box-shadow: 0 12px 24px rgba(91, 92, 226, .2); }
.otp-secondary-action { display: block; margin-top: 20px; color: var(--peno-primary); text-align: center; font-size: 13px; font-weight: 700; }
.otp-login-footer { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 38px; color: #98a2b3; font-size: 12px; }
.otp-login-form .text-danger, .otp-login-form p.text-danger { margin-top: 7px; color: #d92d20; font-size: 12px; }

[dir="rtl"] .otp-primary-action i { transform: rotate(0); }
[dir="ltr"] .otp-primary-action i { transform: rotate(180deg); }

@media (max-width: 800px) {
    .otp-login-shell { padding: 16px; }
    .otp-login-card { display: block; min-height: auto; border-radius: 22px; }
    .otp-login-showcase { display: none; }
    .otp-login-content { min-height: 620px; padding: 88px 28px 38px; }
    .otp-mobile-brand { position: absolute; top: 24px; inset-inline-start: 28px; display: flex; align-items: center; gap: 10px; }
    .otp-mobile-brand .otp-brand-mark { width: 40px; height: 40px; border: 1px solid var(--peno-border); border-radius: 12px; box-shadow: none; font-size: 19px; }
    .otp-language-picker { top: 27px; inset-inline-end: 28px; }
    .otp-language-picker label { display: none; }
    .otp-login-header h1 { font-size: 26px; }
}
