/* ===================================
   Bubble Admin UI polish
   Public website typography lives in public-site.css.
=================================== */

:root {
    --bubble-font-sans: 'Roboto', 'Tajawal', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --bubble-text: #18335f;
    --bubble-muted: #70809f;
    --bubble-border: #dbe7de;
    --bubble-field: #f7faf7;
    --bubble-orange: #f06923;
    --bubble-orange-dark: #d95717;
    --bubble-green: #1fb04b;
    --bubble-cream: #fffaf5;
    --bubble-green-soft: #f2fbf4;
    --bubble-focus: rgba(240, 105, 35, 0.18);
}

html {
    font-size: 16px;
}

body {
    color: var(--bubble-text);
    font-family: var(--bubble-font-sans);
    font-size: 0.95rem;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
.btn,
.table th,
.form-label,
label {
    letter-spacing: 0;
}

p,
.text-muted,
.form-text,
small {
    line-height: 1.6;
}

.btn {
    min-height: 2.5rem;
    white-space: normal;
}

.btn-sm {
    min-height: 2.125rem;
}

.table {
    font-size: 0.9rem;
}

.table th {
    color: #475467;
    font-size: 0.78rem;
}

.form-control,
.form-select,
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="time"] {
    background-color: var(--bubble-field) !important;
    border: 1px solid var(--bubble-border) !important;
    border-radius: 10px !important;
    color: var(--bubble-text);
    font-size: 0.95rem;
    line-height: 1.45;
    min-height: 2.75rem;
    padding: 0.72rem 0.85rem !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.form-control::placeholder,
textarea::placeholder {
    color: #98a2b3;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    background-color: #ffffff !important;
    border-color: var(--bubble-orange) !important;
    box-shadow: 0 0 0 0.16rem var(--bubble-focus) !important;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

label,
.form-label {
    color: #18335f;
    font-size: 0.88rem;
    font-weight: 700;
}

input[type="file"] {
    background-color: var(--bubble-field);
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 0.55rem;
}

input[type="file"]::file-selector-button {
    background-color: var(--bubble-orange);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    cursor: pointer;
    margin-right: 0.65rem;
    padding: 0.55rem 0.85rem;
}

input[type="file"]::file-selector-button:hover {
    background-color: var(--bubble-orange-dark);
}

.inputerror {
    font-size: 0.82rem;
    font-weight: 600;
}

/* Full-screen login */
body.auth-fullscreen-route {
    background: #ffffff !important;
    min-height: 100vh;
    overflow: hidden !important;
}

body.auth-fullscreen-route .main-content,
body.auth-fullscreen-route .customer-auth-shell,
body.auth-fullscreen-route .customer-auth-shell > .row,
body.auth-fullscreen-route .customer-auth-shell > .row > .col-12,
body.auth-fullscreen-route .customer-auth-card--login,
body.auth-fullscreen-route .customer-auth-card--login > .row {
    height: 100vh !important;
    min-height: 100vh !important;
}

body.auth-fullscreen-route .main-content,
.customer-auth-shell {
    margin: 0 !important;
    padding: 0 !important;
}

.customer-auth-shell {
    background: #ffffff;
}

.customer-auth-shell > .row {
    --bs-gutter-x: 0;
    margin: 0 !important;
}

.customer-auth-card--login {
    background: #ffffff;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden;
    width: 100%;
}

.customer-auth-card--login > .row {
    margin: 0;
}

.customer-auth-card--login > .row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
}

.customer-auth-side {
    align-items: center;
    background:
        radial-gradient(circle at 12% 16%, rgba(240, 105, 35, 0.1), transparent 30%),
        linear-gradient(135deg, #fffaf5 0%, #f7faf7 54%, #eef7f1 100%);
    border-right: 1px solid var(--bubble-border);
    color: var(--bubble-text);
    min-height: 100vh;
    padding: clamp(28px, 4vw, 64px) !important;
    position: relative;
    text-align: left;
}

.rtl .customer-auth-side {
    border-left: 1px solid var(--bubble-border);
    border-right: 0;
    text-align: right;
}

.customer-auth-side::before {
    background: linear-gradient(90deg, var(--bubble-orange), #ff8a3d 58%, var(--bubble-green));
    content: "";
    height: 7px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.customer-auth-side__brand {
    align-items: center;
    color: var(--bubble-orange);
    display: flex;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    min-height: 24px;
    text-transform: uppercase;
}

.customer-auth-side__brand::before {
    content: "Bubble Football KW";
}

.customer-auth-side__content {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    max-width: 760px;
    width: min(680px, 100%);
}

.customer-auth-kicker {
    background: #ffffff !important;
    border: 1px solid var(--bubble-border);
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(24, 51, 95, 0.08);
    color: var(--bubble-orange) !important;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 0.48rem 0.8rem;
}

.customer-auth-title {
    color: var(--bubble-text);
    font-family: 'Roboto Slab', 'Tajawal', var(--bubble-font-sans);
    font-size: clamp(1.05rem, 1.1vw, 1.55rem);
    font-weight: 800;
    line-height: 1.18;
    max-width: 420px;
}

.customer-auth-copy {
    color: var(--bubble-muted);
    font-size: clamp(1rem, 1.15vw, 1.15rem);
    line-height: 1.75;
    max-width: 660px;
}

.customer-auth-side__features {
    display: grid;
    gap: 1rem;
    max-width: 680px;
    width: min(680px, 100%);
}

.customer-auth-side__content,
.customer-auth-side__features {
    margin-left: auto;
    margin-right: auto;
}

.customer-auth-side__features .d-flex {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(219, 231, 222, 0.9);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(24, 51, 95, 0.07);
    padding: 0.85rem 1rem;
}

.customer-auth-feature-icon {
    background: var(--bubble-cream);
    border: 1px solid rgba(240, 105, 35, 0.2);
    border-radius: 14px;
    color: var(--bubble-orange);
    flex: 0 0 46px;
    height: 46px;
    width: 46px;
}

.auth-invoice-preview {
    background: #ffffff;
    border: 1px solid var(--bubble-border);
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(24, 51, 95, 0.14);
    margin: 1rem 0;
    max-width: 680px;
    overflow: hidden;
    padding: 1.35rem;
    transform: rotate(-1.5deg);
    width: min(680px, 100%);
}

.auth-invoice-preview__top {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.auth-invoice-preview__top span {
    color: var(--bubble-orange);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-invoice-preview__top strong {
    background: var(--bubble-green-soft);
    border: 1px solid rgba(31, 176, 75, 0.18);
    border-radius: 999px;
    color: var(--bubble-green);
    font-size: 0.78rem;
    padding: 0.35rem 0.7rem;
}

.auth-invoice-preview__banner {
    background: linear-gradient(90deg, var(--bubble-orange), #ff8a3d);
    border-radius: 16px;
    height: 52px;
    margin: 1.35rem 0;
}

.auth-invoice-preview__grid {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(2, 1fr);
}

.auth-invoice-preview__grid span,
.auth-invoice-preview__row,
.auth-invoice-preview__total {
    background: var(--bubble-cream);
    border: 1px solid var(--bubble-border);
    border-radius: 14px;
    min-height: 48px;
}

.auth-invoice-preview__grid span:nth-child(2),
.auth-invoice-preview__grid span:nth-child(3) {
    background: var(--bubble-green-soft);
}

.auth-invoice-preview__row,
.auth-invoice-preview__total {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-top: 0.8rem;
    padding: 0.85rem;
}

.auth-invoice-preview__row span,
.auth-invoice-preview__total span {
    background: #dbe7de;
    border-radius: 999px;
    display: block;
    height: 8px;
    width: 52%;
}

.auth-invoice-preview__row strong,
.auth-invoice-preview__total strong {
    background: var(--bubble-orange);
    border-radius: 999px;
    display: block;
    height: 12px;
    width: 72px;
}

.auth-invoice-preview__total {
    background: var(--bubble-green-soft);
}

.auth-invoice-preview__total strong {
    background: var(--bubble-green);
}

.customer-auth-panel {
    background:
        radial-gradient(circle at 100% 0%, rgba(240, 105, 35, 0.08), transparent 24%),
        #ffffff;
    min-height: 100vh;
}

.customer-auth-panel__inner {
    margin: 0 auto;
    max-width: 430px;
    padding: clamp(24px, 4.5vw, 58px) clamp(24px, 3.2vw, 48px);
    width: 100%;
}

.customer-auth-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
}

.auth-language-toggle {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--bubble-border);
    border-radius: 999px;
    box-shadow: 0 14px 28px rgba(24, 51, 95, 0.1);
    display: inline-grid;
    gap: 0.25rem;
    grid-template-columns: repeat(2, minmax(44px, 1fr));
    padding: 0.25rem;
}

.auth-language-toggle__item {
    align-items: center;
    border-radius: 999px;
    color: var(--bubble-text);
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 900;
    justify-content: center;
    min-height: 32px;
    padding: 0.35rem 0.7rem;
    text-decoration: none;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.auth-language-toggle__item:hover {
    color: var(--bubble-orange);
    text-decoration: none;
}

.auth-language-toggle__item.is-active {
    background: var(--bubble-orange);
    box-shadow: 0 8px 16px rgba(240, 105, 35, 0.22);
    color: #ffffff;
}

.customer-auth-actions .btn,
.customer-auth-actions .btn-sm {
    background: var(--bubble-cream) !important;
    border: 1px solid rgba(240, 105, 35, 0.28) !important;
    border-radius: 999px !important;
    box-shadow: 0 10px 22px rgba(240, 105, 35, 0.08);
    color: var(--bubble-orange) !important;
    font-weight: 800;
    min-height: 38px;
    padding-left: 1rem;
    padding-right: 1rem;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.customer-auth-actions .btn:hover,
.customer-auth-actions .btn-sm:hover {
    background: var(--bubble-orange) !important;
    border-color: var(--bubble-orange) !important;
    box-shadow: 0 14px 26px rgba(240, 105, 35, 0.2);
    color: #ffffff !important;
}

.customer-auth-actions .bg-gradient-dark {
    background: #111827 !important;
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.2) !important;
    color: #ffffff !important;
}

.customer-auth-heading h3 {
    color: var(--bubble-text) !important;
    font-family: 'Roboto Slab', 'Tajawal', var(--bubble-font-sans);
    font-size: clamp(1.8rem, 2.2vw, 2.45rem);
    line-height: 1.15;
}

.customer-auth-heading p,
.customer-auth-form .text-muted {
    color: var(--bubble-muted) !important;
}

.customer-auth-form .form-control {
    background: #ffffff !important;
    border-color: var(--bubble-border) !important;
    border-radius: 14px !important;
    min-height: 54px;
}

.customer-auth-form .text-primary {
    color: var(--bubble-orange) !important;
}

.customer-auth-submit,
.customer-auth-submit:hover,
.customer-auth-submit:focus {
    background: linear-gradient(135deg, var(--bubble-orange), #ff7f36) !important;
    border: 0 !important;
    border-radius: 14px !important;
    box-shadow: 0 14px 28px rgba(240, 105, 35, 0.24) !important;
    color: #ffffff !important;
    font-weight: 900;
    min-height: 54px;
    text-transform: uppercase;
}

.customer-auth-submit:hover {
    background: linear-gradient(135deg, var(--bubble-orange-dark), var(--bubble-orange)) !important;
    transform: translateY(-1px);
}

.customer-auth-form .form-check-input:checked {
    background-color: var(--bubble-orange);
    border-color: var(--bubble-orange);
}

.rtl .customer-auth-actions {
    direction: rtl;
}

.rtl .customer-auth-heading,
.rtl .customer-auth-form,
.rtl .customer-auth-side__content,
.rtl .customer-auth-side__features {
    text-align: right;
}

.rtl .customer-auth-side__content {
    align-items: flex-end;
}

.rtl .customer-auth-side__features .d-flex {
    flex-direction: row-reverse;
}

.rtl .customer-auth-form .form-control {
    text-align: right;
}

@media (max-width: 991.98px) {
    body.auth-fullscreen-route {
        overflow: auto !important;
    }

    body.auth-fullscreen-route .main-content,
    body.auth-fullscreen-route .customer-auth-shell,
    body.auth-fullscreen-route .customer-auth-shell > .row,
    body.auth-fullscreen-route .customer-auth-shell > .row > .col-12,
    body.auth-fullscreen-route .customer-auth-card--login,
    body.auth-fullscreen-route .customer-auth-card--login > .row,
    .customer-auth-panel {
        height: auto !important;
        min-height: 100vh !important;
    }

    .customer-auth-panel__inner {
        max-width: 560px;
        padding: 32px 20px;
    }
}

@media (max-width: 1400px), (max-height: 820px) {
    body.auth-fullscreen-route {
        font-size: 0.78rem;
    }

    .customer-auth-side {
        gap: 0.7rem;
        justify-content: center !important;
        padding: 14px 28px !important;
    }

    .customer-auth-side__brand {
        font-size: 0.56rem;
        min-height: 14px;
    }

    .auth-invoice-preview {
        border-radius: 18px;
        margin: 0;
        max-width: 350px;
        padding: 0.72rem;
        width: min(350px, 100%);
    }

    .auth-invoice-preview__top span {
        font-size: 0.52rem;
    }

    .auth-invoice-preview__top strong {
        font-size: 0.56rem;
        padding: 0.18rem 0.44rem;
    }

    .auth-invoice-preview__banner {
        border-radius: 10px;
        height: 28px;
        margin: 0.68rem 0;
    }

    .auth-invoice-preview__grid {
        gap: 0.38rem;
    }

    .auth-invoice-preview__grid span,
    .auth-invoice-preview__row,
    .auth-invoice-preview__total {
        border-radius: 9px;
        min-height: 26px;
    }

    .auth-invoice-preview__row,
    .auth-invoice-preview__total {
        margin-top: 0.38rem;
        padding: 0.42rem;
    }

    .customer-auth-kicker {
        font-size: 0.54rem;
        padding: 0.26rem 0.48rem;
    }

    .customer-auth-title {
        font-size: clamp(0.82rem, 0.9vw, 1rem);
        line-height: 1.12;
        margin-bottom: 0.3rem !important;
        margin-top: 0.45rem !important;
        max-width: 320px;
    }

    .customer-auth-copy {
        font-size: 0.72rem;
        line-height: 1.35;
        max-width: 330px;
    }

    .customer-auth-side__features {
        gap: 0.34rem;
        max-width: 680px;
        width: min(680px, 100%);
    }

    .customer-auth-side__features .d-flex {
        border-radius: 11px;
        margin-bottom: 0.34rem !important;
        padding: 0.38rem 0.52rem;
    }

    .customer-auth-feature-icon {
        border-radius: 9px;
        flex-basis: 30px;
        height: 30px;
        width: 30px;
    }

    .customer-auth-side__features .font-weight-bold {
        font-size: 0.72rem;
    }

    .customer-auth-side__features small {
        font-size: 0.64rem;
        line-height: 1.25;
    }

    .customer-auth-panel__inner {
        max-width: 318px;
        padding: 14px 20px;
    }

    .customer-auth-actions {
        gap: 0.4rem;
        margin-bottom: 0.8rem !important;
    }

    .auth-language-toggle {
        padding: 0.14rem;
    }

    .auth-language-toggle__item {
        font-size: 0.58rem;
        min-height: 24px;
        padding: 0.18rem 0.46rem;
    }

    .customer-auth-actions .btn,
    .customer-auth-actions .btn-sm {
        font-size: 0.58rem;
        min-height: 28px;
        padding-left: 0.62rem;
        padding-right: 0.62rem;
    }

    .customer-auth-heading {
        margin-bottom: 0.85rem !important;
    }

    .customer-auth-heading h3 {
        font-size: 1.18rem;
        margin-bottom: 0.25rem !important;
    }

    .customer-auth-heading p {
        font-size: 0.74rem;
        line-height: 1.35;
    }

    .customer-auth-form .mt-3,
    .customer-auth-form .mt-4 {
        margin-top: 0.55rem !important;
    }

    .customer-auth-form label,
    .customer-auth-form .form-label {
        font-size: 0.66rem;
        margin-bottom: 0.25rem !important;
    }

    .customer-auth-form .form-control {
        border-radius: 10px !important;
        font-size: 0.76rem;
        min-height: 38px;
        padding-bottom: 0.42rem !important;
        padding-top: 0.42rem !important;
    }

    .customer-auth-form .text-end {
        margin-top: 0.45rem !important;
    }

    .customer-auth-submit,
    .customer-auth-submit:hover,
    .customer-auth-submit:focus {
        border-radius: 10px !important;
        font-size: 0.62rem;
        min-height: 38px;
    }

    .customer-auth-form .text-center.mt-4 {
        margin-top: 0.7rem !important;
    }

    .customer-auth-form p.text-sm {
        font-size: 0.66rem !important;
    }
}

@media (max-width: 575.98px) {
    body {
        font-size: 0.92rem;
    }

    .customer-auth-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .customer-auth-actions .btn-group,
    .customer-auth-actions > .btn {
        width: 100%;
    }

    .customer-auth-actions .btn-group .btn {
        flex: 1 1 0;
    }
}

/* Customer register uses the same professional full-screen shell as login. */
.customer-auth-card--register .customer-auth-side {
    justify-content: center !important;
}

.customer-auth-card--register .customer-auth-panel__inner {
    max-width: 470px;
}

.customer-auth-card--register .customer-auth-heading h3 {
    font-size: clamp(1.55rem, 1.9vw, 2.1rem);
}

.customer-auth-card--register .customer-auth-heading p {
    max-width: 420px;
}

.customer-auth-card--register .auth-invoice-preview {
    margin-bottom: 0.75rem;
}

@media (max-width: 1400px), (max-height: 820px) {
    .customer-auth-card--register .customer-auth-panel__inner {
        max-width: 390px;
        padding-bottom: 14px;
        padding-top: 14px;
    }

    .customer-auth-card--register .customer-auth-heading h3 {
        font-size: 1.12rem;
    }

    .customer-auth-card--register .customer-auth-heading p {
        font-size: 0.7rem;
        line-height: 1.35;
    }
}
