@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap');


:root {
    --cc-blue: #0054a4;
    --cc-indigo: #024585;
    --cc-purple: #6f42c1;
    --cc-pink: #d63384;
    --cc-red: #e30e10;
    --cc-orange: #f89728;
    --cc-yellow: #ffc107;
    --cc-green: #91c447;
    --cc-teal: #20c997;
    --cc-cyan: #29abe2;
    --cc-white: #fff;
    --cc-gray: #767676;
    --cc-gray-dark: #343a40;
    --cc-primary: #0054a4;
    --cc-secondary: #6c757d;
    --cc-success: #91c447;
    --cc-info: #29abe2;
    --cc-warning: #f89728;
    --cc-danger: #e30e10;
    --cc-light: #f8f9fa;
    --cc-dark: #212529;
    --cc-font-sans-serif: 'Nunito Sans', -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --cc-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --cc-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));

    --cc-brand-primary: #0054a4;
    --cc-brand-primary-strong: #024585;
    --cc-brand-secondary: #91c447;
    --cc-brand-accent: #f89728;
    --cc-text-main: #212529;
    --cc-text-body: #4a4a4a;
    --cc-text-muted: #767676;
    --cc-surface: #fff;
    --cc-button-radius: 50px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Nunito Sans", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--cc-text-body);
    background: var(--cc-surface);
}

h1,
h2,
h3,
h4,
h5,
h6,
legend {
    margin-top: 0;
    color: var(--cc-text-main);
    font-family: "Nunito Sans", Arial, sans-serif;
    letter-spacing: 0.01em;
}

a {
    color: var(--cc-brand-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--cc-brand-primary-strong);
}

.main {
    min-height: 100vh;
    padding: clamp(0.75rem, 2vw, 1.25rem) 0;
}

.container {
    width: min(1120px, 94vw);
}

.message {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 0.65rem;
    border-left: 4px solid var(--cc-brand-primary);
    background: rgba(0, 84, 164, 0.1);
    color: #0a3a6a;
}

.message.error {
    border-left-color: var(--cc-danger);
    background: rgba(227, 14, 16, 0.1);
    color: #7a0f0f;
}

.message.success {
    border-left-color: var(--cc-success);
    background: rgba(145, 196, 71, 0.14);
    color: #2e4c1b;
}

.form-floating-out {
    position: relative;
    margin: 1rem 0;
}

.form-floating-out>label {
    position: absolute;
    left: 0.72rem;
    top: 50%;
    z-index: 2;
    margin: 0;
    padding: 0 0.32rem;
    border-radius: 0.35rem;
    background: var(--cc-surface);
    color: var(--cc-text-muted);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-50%);
    transition: top 0.2s ease, transform 0.2s ease, opacity 0.15s ease, color 0.2s ease, font-size 0.2s ease;
}

.form-floating-out>textarea+label {
    top: 1.2rem;
}

.form-floating-out> :is(input, textarea, select, tel) {
    margin: 0;
}

.form-floating-out> :is(input, textarea, select, tel)::placeholder {
    color: #a0a0a0;
}

.form-floating-out:focus-within> :is(input, textarea, tel)::placeholder {
    color: transparent;
}

.form-floating-out>textarea {
    min-height: 132px;
    resize: vertical;
}

.form-floating-out:focus-within>label,
.form-floating-out>input:not(:placeholder-shown)+label,
.form-floating-out>textarea:not(:placeholder-shown)+label,
.form-floating-out>tel:not(:placeholder-shown)+label,
.form-floating-out>select:focus+label,
.form-floating-out>select:valid+label {
    top: 0;
    opacity: 1;
    font-size: 0.74rem;
    color: var(--cc-brand-primary);
    font-weight: 400;
    transform: translateY(-50%);
}

.form-floating-out>select+label {
    top: 50%;
    opacity: 0;
    font-size: 0.9rem;
    color: var(--cc-text-muted);
    transform: translateY(-50%);
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="tel"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: 0.7rem 0.8rem;
    border: 1px solid #c9c9c9;
    border-radius: 0.55rem;
    background: var(--cc-surface);
    color: var(--cc-text-main);
    font-family: "Nunito Sans", Arial, sans-serif;
    font-size: 0.97rem;
    outline: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--cc-brand-primary);
    box-shadow: 0 0 0 3px rgba(0, 84, 164, 0.18);
    transform: translateY(-1px);
}

body button,
body input[type="submit"],
body .button,
body .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 42px;
    padding: 0.68rem 1.15rem;
    border: 0;
    border-radius: var(--cc-button-radius) !important;
    font-family: "Nunito Sans", Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--cc-white);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    background: var(--cc-brand-primary-strong);
}

button:hover,
input[type="submit"]:hover,
.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 46, 89, 0.34);
    filter: saturate(1.1) brightness(1.03);
}

button:active,
input[type="submit"]:active,
.button:active {
    transform: translateY(0);
}

a {
    text-decoration: none;
    color: var(--cc-brand-primary);
    font-weight: 500;
}

.portal-topbar,
.portal-sidebar,
.portal-mobile-nav {
    --portal-shell-bg: #002e59;
    --portal-nav-bg: var(--portal-shell-bg);
    --portal-nav-bg-raised: #0054a4;
    --portal-nav-border: rgba(255, 255, 255, 0.12);
    --portal-nav-text: #ffffff;
    --portal-nav-muted: #b0d4ff;
    --portal-nav-accent: #f89728;
}

.portal-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1045;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    padding: 0 1.35rem;
    border-bottom: 1px solid var(--portal-nav-border);
    background: var(--portal-shell-bg);
    box-shadow: 0 14px 34px rgba(0, 46, 89, 0.18);
}

.portal-topbar__actions,
.portal-topbar__right,
.portal-topbar__user {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.portal-topbar__logo {
    display: block;
    width: 148px;
    height: auto;
}

.portal-icon-button,
body .portal-icon-button,
.portal-user-button,
body .portal-user-button {
    min-height: 42px;
    border: 1px solid var(--portal-nav-border);
    border-radius: 0.55rem !important;
    color: var(--portal-nav-text);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
    filter: none;
    transform: none;
}

.portal-icon-button,
body .portal-icon-button {
    width: 42px;
    padding: 0;
    font-size: 1.2rem;
}

.portal-icon-button:hover,
body .portal-icon-button:hover,
.portal-user-button:hover,
body .portal-user-button:hover {
    color: var(--cc-white);
    background: rgba(255, 255, 255, 0.11);
    box-shadow: none;
    filter: none;
    transform: none;
}

.portal-user-button,
body .portal-user-button {
    gap: 0.6rem;
    padding: 0.45rem 0.72rem;
    font-family: "Nunito Sans", Arial, sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
}

.portal-user-button__avatar {
    display: inline-grid;
    place-items: center;
    color: var(--portal-nav-accent);
    font-size: 1.22rem;
}

.portal-user-button__name {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-user-menu {
    min-width: 190px;
    padding: 0.45rem;
    border: 1px solid #d7d7d7;
    border-radius: 0.65rem;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.16);
}

.portal-user-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 38px;
    border-radius: 0.45rem;
    color: var(--cc-text-main);
    font-weight: 600;
}

.portal-user-menu .dropdown-item:hover {
    color: #002e59;
    background: #e8f0fe;
}

.portal-sidebar {
    position: fixed;
    top: 68px;
    bottom: 0;
    left: 0;
    z-index: 1035;
    display: flex;
    flex-direction: column;
    width: 200px;
    padding: 1rem;
    border-right: 1px solid var(--portal-nav-border);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    background: var(--portal-shell-bg);
    color: var(--portal-nav-text);
    overflow: visible;
    transition: width 0.22s ease, padding 0.22s ease;
}

.portal-sidebar__header {
    display: flex;
    align-items: center;
    min-height: 48px;
    margin-bottom: 1rem;
    padding: 0 0.6rem;
}

.portal-sidebar__title {
    color: var(--portal-nav-muted);
    font-family: "Nunito Sans", Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
}

.portal-sidebar__footer {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 1rem;
}

.portal-sidebar__toggle,
body .portal-sidebar__toggle {
    flex: 0 0 42px;
    width: 42px;
    min-height: 42px;
    padding: 0;
    border: 1px solid var(--portal-nav-border);
    border-radius: 0.55rem !important;
    color: var(--portal-nav-text);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
    transform: none;
}

.portal-sidebar__toggle:hover,
body .portal-sidebar__toggle:hover {
    color: var(--cc-white);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
    transform: none;
}

.portal-sidebar__toggle-expand {
    display: none;
}

.portal-nav {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.portal-nav__section {
    display: grid;
    gap: 0.32rem;
}

.portal-nav__section-title {
    padding: 0 0.6rem;
    color: var(--portal-nav-muted);
    font-family: "Nunito Sans", Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.portal-nav__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.72rem;
    min-height: 44px;
    padding: 0.68rem 0.76rem;
    border: 1px solid transparent;
    border-radius: 0.55rem;
    color: var(--portal-nav-text);
    font-family: "Nunito Sans", Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.portal-nav__link i {
    width: 1.3rem;
    color: var(--portal-nav-accent);
    font-size: 1.08rem;
    text-align: center;
}

.portal-nav__link:hover,
.portal-nav__link:focus {
    color: var(--cc-white);
    border-color: var(--portal-nav-border);
    background: rgba(255, 255, 255, 0.08);
}

.portal-nav__link.is-active {
    color: var(--cc-white);
    border-color: rgba(248, 151, 40, 0.55);
    background: rgba(248, 151, 40, 0.17);
    box-shadow: inset 3px 0 0 var(--portal-nav-accent);
}

.portal-nav__link.is-active i {
    color: #ffcc80;
}

.portal-main {
    min-height: 100vh;
    margin-left: 200px;
    padding: calc(68px + 0.9rem) clamp(0.75rem, 1.6vw, 1.35rem) clamp(0.75rem, 1.6vw, 1.35rem);
    background: var(--cc-surface);
    transition: margin-left 0.22s ease;
}

.portal-mobile-menu-button {
    display: none !important;
}

.portal-mobile-nav {
    width: min(360px, 88vw) !important;
    border-left: 1px solid var(--portal-nav-border);
    color: var(--portal-nav-text);
    background: var(--portal-shell-bg);
}

.portal-mobile-nav__header {
    position: relative;
    align-items: flex-start;
    min-height: 104px;
    padding: 1.35rem 4.5rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--portal-nav-border);
}

.portal-mobile-nav__identity {
    display: grid;
    gap: 0.3rem;
    max-width: 100%;
}

.portal-mobile-nav__eyebrow {
    color: var(--portal-nav-muted);
    font-family: "Nunito Sans", Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.portal-mobile-nav__title {
    margin: 0;
    color: var(--portal-nav-text);
    font-size: clamp(1.05rem, 5vw, 1.35rem);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.2;
}

.portal-mobile-nav__close,
body .portal-mobile-nav__close {
    position: fixed;
    top: 0.95rem;
    right: 0.95rem;
    z-index: 1085;
}

.portal-mobile-nav__body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

html.portal-sidebar-collapsed .portal-sidebar {
    width: 84px;
    padding: 1rem 0.65rem;
}

html.portal-sidebar-collapsed .portal-main {
    margin-left: 84px;
}

html.portal-sidebar-collapsed .portal-sidebar__header {
    justify-content: center;
    min-height: 24px;
    margin-bottom: 1.4rem;
    padding: 0;
}

html.portal-sidebar-collapsed .portal-sidebar__title {
    display: none;
}

html.portal-sidebar-collapsed .portal-sidebar__footer {
    justify-content: center;
}

html.portal-sidebar-collapsed .portal-sidebar__toggle-collapse {
    display: none;
}

html.portal-sidebar-collapsed .portal-sidebar__toggle-expand {
    display: inline-block;
}

html.portal-sidebar-collapsed .portal-sidebar .portal-nav {
    align-items: center;
}

html.portal-sidebar-collapsed .portal-sidebar .portal-nav__section {
    width: 100%;
    justify-items: center;
}

html.portal-sidebar-collapsed .portal-sidebar .portal-nav__section-title,
html.portal-sidebar-collapsed .portal-sidebar .portal-nav__link span {
    display: none;
}

html.portal-sidebar-collapsed .portal-sidebar .portal-nav__link {
    justify-content: center;
    width: 48px;
    min-height: 48px;
    padding: 0;
    border-radius: 0.65rem;
}

html.portal-sidebar-collapsed .portal-sidebar .portal-nav__link i {
    width: auto;
    font-size: 1.22rem;
}

html.portal-sidebar-collapsed .portal-sidebar .portal-nav__link.is-active {
    box-shadow: inset 0 -3px 0 var(--portal-nav-accent);
}

html.portal-sidebar-collapsed .portal-sidebar .portal-nav__link[data-tooltip]::after {
    position: absolute;
    top: 50%;
    left: calc(100% + 0.85rem);
    z-index: 3000;
    padding: 0.62rem 0.78rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.55rem;
    color: var(--cc-white);
    background: #002e59;
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(248, 151, 40, 0.14);
    content: attr(data-tooltip);
    font-family: "Nunito Sans", Arial, sans-serif;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform: translate(8px, -50%);
    transition: opacity 0.16s ease, transform 0.16s ease;
    white-space: nowrap;
}

html.portal-sidebar-collapsed .portal-sidebar .portal-nav__link[data-tooltip]::before {
    position: absolute;
    top: 50%;
    left: calc(100% + 0.45rem);
    z-index: 3001;
    width: 0.62rem;
    height: 0.62rem;
    background: #002e59;
    content: "";
    opacity: 0;
    pointer-events: none;
    transform: translate(8px, -50%) rotate(45deg);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

html.portal-sidebar-collapsed .portal-sidebar .portal-nav__link[data-tooltip]:hover::after,
html.portal-sidebar-collapsed .portal-sidebar .portal-nav__link[data-tooltip]:focus::after,
html.portal-sidebar-collapsed .portal-sidebar .portal-nav__link[data-tooltip]:hover::before,
html.portal-sidebar-collapsed .portal-sidebar .portal-nav__link[data-tooltip]:focus::before {
    opacity: 1;
    transform: translate(0, -50%);
}

.flatpickr-calendar {
    border: 1px solid #d7d7d7;
    border-radius: 0.55rem;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
    font-family: "Nunito Sans", Arial, sans-serif;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover {
    border-color: var(--cc-brand-primary);
    background: var(--cc-brand-primary);
}

.border-none {
    border: none !important;
}

.text-primary {
    color: var(--cc-primary) !important;
}

.swal2-container button.swal2-confirm {
    background-color: var(--cc-primary) !important;
    color: var(--cc-white) !important;
}

.swal2-container button.swal2-close {
    background-color: transparent !important;
    color: inherit !important;
}

@keyframes cc-card-enter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@media (max-width: 640px) {
    .main {
        padding-top: 1.1rem;
    }

    .form-floating-out {
        margin: 0.9rem 0;
    }
}

/* Deliveries pill variants */
.deliveries-pill.primary {
    border-color: rgba(0, 84, 164, 0.25);
    color: #0a3a6a;
    background: #e8f0fe;
}

.deliveries-pill.info {
    border-color: rgba(41, 171, 226, 0.2);
    color: #0e6ba0;
    background: #e8f4fe;
}

.deliveries-pill.danger {
    border-color: rgba(227, 14, 16, 0.2);
    color: #8b2a3a;
    background: #fee8ea;
}

.deliveries-pill.success {
    border-color: rgba(145, 196, 71, 0.22);
    color: #2e4c1b;
    background: #eef6e3;
}

.deliveries-pill.warning {
    border-color: rgba(248, 151, 40, 0.25);
    color: #7b4b00;
    background: #fff4d8;
}

.deliveries-pill.secondary {
    border-color: rgba(179, 179, 179, 0.25);
    color: #747474;
    background: #f7f6f6;
}

/* Preview modal styles */
.preview-modal-popup {
    padding: 0 !important;
}

.preview-modal-html {
    padding: 1rem !important;
}

.preview-image {
    display: block;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .portal-sidebar {
        display: none;
    }

    .portal-topbar {
        left: 0;
        min-height: 62px;
        padding: 0 0.8rem;
    }

    .portal-mobile-menu-button {
        display: inline-flex !important;
    }

    .portal-topbar__user {
        display: none;
    }

    .portal-topbar__logo {
        width: 128px;
    }

    .portal-user-button__name {
        max-width: 130px;
    }

    .portal-main {
        margin-left: 0;
        padding: calc(62px + 0.75rem) 0.75rem 0.75rem;
    }

}

@media (max-width: 520px) {
    .portal-user-button__name {
        display: none;
    }

    .portal-user-button,
    body .portal-user-button {
        width: 42px;
        padding: 0;
    }

    .portal-user-button::after {
        display: none;
    }

}

.swal2-cancel {
    background: var(--cc-secondary) !important;
}


.btn-primary:hover,
.btn-primary:active,
.btn-primary:disabled  {
    color: var(--cc-white) !important;
    background-color: var(--cc-brand-primary-strong) !important;
    border-color: var(--cc-brand-primary-strong) !important;
}