:root {
    /* Rod Technology brand (same as forms) */
    --rod-primary: #001A8E;
    --rod-primary-dark: #000d4d;
    --rod-primary-mid: #001A8E;
    --rod-primary-light: #1a3ab8;
    --rod-accent: #C9A227;
    --rod-accent-soft: rgba(201, 162, 39, 0.18);
    --rod-text: #12122a;
    --rod-muted: #5b6478;
    --rod-border: #d8dee9;
    --rod-bg: #eef1f8;
    --rod-white: #ffffff;
    --rod-shadow: 0 4px 6px -1px rgba(0, 26, 142, 0.08), 0 2px 4px -2px rgba(0, 26, 142, 0.05);

    --primary-color: #001A8E;
    --secondary-color: #C9A227;
}

body {
    background-color: var(--rod-bg) !important;
    color: var(--rod-text);
    font-family: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

@media (min-width: 1200px) {
    .container,
    .container-lg,
    .container-md,
    .container-sm,
    .container-xl {
        max-width: 1100px !important;
    }
}

.header {
    margin-bottom: 1rem !important;
}

.header-title {
    font-family: 'Source Serif 4', Georgia, serif !important;
    font-weight: 700 !important;
    color: var(--rod-white) !important;
    font-size: 1.35rem !important;
}

.border-bottom {
    border-bottom: 1px solid var(--primary-color) !important;
}

.content {
    margin-top: 1rem !important;
}

.wrapper:before {
    height: 9.5rem !important;
    background: linear-gradient(135deg, #000d4d 0%, #001A8E 42%, #1a3ab8 78%, #2a4fd4 100%) !important;
}

/* ---------- Buttons ---------- */
.btn-primary,
.list-group-item.active,
.bg-primary-dark,
.splash .splash-icon {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    border-color: var(--primary-color) !important;
}

.btn-primary:hover {
    background-color: var(--rod-primary-light) !important;
    border-color: var(--rod-primary-light) !important;
    color: #fff !important;
}

.btn-outline-primary {
    background-color: transparent !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}

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

.text-bg-warning,
.bg-warning {
    background-color: var(--secondary-color) !important;
    color: #12122a !important;
}

/* ---------- Top navbar ---------- */
.navbar-theme {
    background: transparent !important;
}

.navbar .hamburger,
.navbar .nav-link,
.navbar .nav-link i {
    color: #fff !important;
}

/* ---------- Sidebar (Rod brand) ---------- */
#sidebar.sidebar {
    background: linear-gradient(180deg, #000d4d 0%, #001A8E 55%, #001566 100%) !important;
    box-shadow: 4px 0 24px rgba(0, 13, 77, 0.25);
    z-index: 1040;
    color: #fff !important;
}

#sidebar .sidebar-content,
#sidebar .sidebar-nav,
#sidebar .sidebar-user,
#sidebar .sidebar-dropdown,
#sidebar .sidebar-dropdown .sidebar-link {
    background: transparent !important;
}

#sidebar .sidebar-brand,
#sidebar .sidebar-brand:hover {
    background-color: transparent !important;
}

#sidebar .sidebar-user {
    padding: 1.25rem 1rem 1rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 0.5rem;
    text-align: left !important;
}

#sidebar .sidebar-user .navbar-brand {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #fff !important;
    width: 100%;
}

#sidebar .sidebar-user img,
#sidebar .sidebar-user .logo {
    height: 42px !important;
    width: auto !important;
    max-width: 52px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 4px !important;
    flex-shrink: 0;
}

#sidebar .sidebar-brand-text {
    display: flex !important;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

#sidebar .sidebar-brand-text strong {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 0.95rem;
    color: #fff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#sidebar .sidebar-brand-text small {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.75) !important;
}

#sidebar .sidebar-nav {
    padding: 0.75rem 0.85rem 1.5rem !important;
}

#sidebar .sidebar-item {
    margin-bottom: 0.35rem !important;
}

#sidebar .sidebar-link,
#sidebar a.sidebar-link {
    border-radius: 10px !important;
    padding: 0.7rem 0.85rem !important;
    margin: 0 !important;
    color: rgba(255, 255, 255, 0.92) !important;
    font-weight: 500;
    display: flex !important;
    align-items: center;
    gap: 0.35rem;
    transition: background 0.2s, color 0.2s;
}

#sidebar .sidebar-link span,
#sidebar a.sidebar-link span {
    color: inherit !important;
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#sidebar .sidebar-link:hover,
#sidebar a.sidebar-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.12) !important;
}

#sidebar a.sidebar-link .fab,
#sidebar a.sidebar-link .fal,
#sidebar a.sidebar-link .far,
#sidebar a.sidebar-link .fas,
#sidebar a.sidebar-link svg,
#sidebar .sidebar-link .fab,
#sidebar .sidebar-link .fal,
#sidebar .sidebar-link .far,
#sidebar .sidebar-link .fas,
#sidebar .sidebar-link svg {
    color: #C9A227 !important;
    margin-right: 0.5rem !important;
    flex-shrink: 0;
}

#sidebar .sidebar-item.active > .sidebar-link {
    background: linear-gradient(135deg, #d4af37 0%, #C9A227 100%) !important;
    color: #12122a !important;
    box-shadow: 0 6px 16px rgba(201, 162, 39, 0.35);
    font-weight: 700;
}

#sidebar .sidebar-item.active > .sidebar-link span {
    color: #12122a !important;
}

#sidebar .sidebar-item.active > .sidebar-link .fas,
#sidebar .sidebar-item.active > .sidebar-link .far,
#sidebar .sidebar-item.active > .sidebar-link .fal,
#sidebar .sidebar-item.active > .sidebar-link .fab {
    color: #12122a !important;
}

#sidebar .sidebar-item.active > .sidebar-link .badge {
    background: #12122a !important;
    color: #C9A227 !important;
}

#sidebar [data-bs-toggle=collapse]:before {
    top: 1.15rem !important;
    color: rgba(255, 255, 255, 0.65) !important;
    right: 0.85rem !important;
}

#sidebar .sidebar-dropdown {
    padding-left: 0.35rem !important;
    margin-top: 0.25rem;
}

#sidebar .sidebar-dropdown .sidebar-link {
    padding: 0.55rem 0.75rem 0.55rem 1.4rem !important;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85) !important;
}

#sidebar .sidebar-dropdown .sidebar-item.active > .sidebar-link {
    background: rgba(201, 162, 39, 0.25) !important;
    color: #fff !important;
    box-shadow: none;
}

#sidebar .badge {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: 999px;
    padding: 0.35em 0.65em;
    margin-left: auto;
}

/* Mobile sidebar — fully off-canvas when closed */
.sidebar-mobile-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 13, 77, 0.55);
    z-index: 1035;
}

.sidebar-close-mobile {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

@media (max-width: 991.98px) {
    .sidebar-close-mobile {
        display: inline-flex;
    }

    /* Keep layout full-width; drawer overlays content */
    .wrapper {
        display: block !important;
    }

    .wrapper > .main {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
    }

    #sidebar.sidebar {
        position: fixed !important;
        top: 0;
        bottom: 0;
        left: 0;
        height: 100vh;
        height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
        z-index: 1040 !important;
        width: min(280px, 85vw) !important;
        max-width: 280px !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        transform: translateX(-110%);
        transition: transform 0.25s ease !important;
        box-shadow: none !important;
        pointer-events: none;
        visibility: hidden;
    }

    #sidebar.sidebar .sidebar-content {
        left: 0 !important;
        margin-left: 0 !important;
        width: 100% !important;
    }

    #sidebar.sidebar.toggled {
        transform: translateX(0);
        margin-left: 0 !important;
        box-shadow: 8px 0 28px rgba(0, 13, 77, 0.35) !important;
        pointer-events: auto;
        visibility: visible;
    }

    #sidebar.sidebar.toggled + .sidebar-mobile-backdrop {
        display: block;
    }

    body:has(#sidebar.toggled) {
        overflow: hidden;
    }

    .wrapper:before {
        height: 7.5rem !important;
    }

    .header-title {
        font-size: 1.1rem !important;
    }

    .content .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}


/* ---------- Cards / tables ---------- */
.card {
    border: 1px solid var(--rod-border) !important;
    box-shadow: var(--rod-shadow) !important;
    border-radius: 14px !important;
}

.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--rod-border) !important;
}

.table thead th {
    color: var(--rod-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom-color: var(--rod-border) !important;
}

/* ---------- Forms / focus ---------- */
input:focus,
textarea:focus,
select:focus,
button:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px var(--rod-accent-soft) !important;
    border-color: var(--primary-color) !important;
}

.mb-2-8 {
    margin-bottom: 2.8rem;
}

.title-space {
    padding-bottom: 0.6rem;
}

.btn-accoring-to-text {
    width: revert;
}

.dispatch-note {
    display: block;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: left;
    padding: 8px;
}

.cardscroll {
    overflow-x: hidden !important;
    overflow-y: scroll !important;
    max-height: 20rem;
}

.logo {
    height: 4rem !important;
}

.center-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.nav-tab {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin-bottom: 0;
    padding-left: 0;
}

.nav-item-tab {
    padding: 0.5rem !important;
}

.nav-tab .active {
    background-color: #ececec;
}

.min-height {
    min-height: 85vh !important;
}

.big-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background-color: #fff;
}

.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
}

.avatar-sm { height: 32px !important; width: 32px !important; min-width: 32px; min-height: 32px; }
.avatar-md { height: 48px !important; width: 48px !important; min-width: 48px; min-height: 48px; }
.avatar-lg { height: 64px !important; width: 64px !important; min-width: 64px; min-height: 64px; }

.avatar i,
.avatar > *,
.quick-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.stats-card .bg-primary,
.stats-card .bg-info,
.stats-card .bg-warning,
.stats-card .bg-success,
.stats-card .bg-danger {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
}

.validation-message {
    font-size: 13px !important;
}

/* ---------- Login (professional Rod style) ---------- */
body.rod-login-page {
    min-height: 100vh;
    background:
        radial-gradient(ellipse 80% 50% at 10% -10%, rgba(201, 162, 39, 0.2), transparent 50%),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(0, 26, 142, 0.2), transparent 45%),
        linear-gradient(160deg, #000d4d 0%, #001A8E 40%, #eef1f8 40%, #eef1f8 100%) !important;
}

.rod-login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.rod-login-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--rod-border);
    box-shadow: 0 20px 40px rgba(0, 13, 77, 0.18);
    padding: 2rem 1.75rem 1.75rem;
}

.rod-login-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.rod-login-brand img {
    max-height: 64px;
    width: auto;
    margin-bottom: 0.75rem;
}

.rod-login-brand h1 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--rod-primary);
    margin: 0 0 0.25rem;
}

.rod-login-brand p {
    margin: 0;
    color: var(--rod-muted);
    font-size: 0.925rem;
}

.rod-login-card .btn-login {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #000d4d 0%, #001A8E 50%, #1a3ab8 100%);
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(0, 26, 142, 0.28);
}

.rod-login-card .btn-login:hover {
    filter: brightness(1.05);
    color: #fff !important;
}

.rod-login-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.8rem;
    color: var(--rod-muted);
}

.rod-login-footer a {
    color: var(--rod-primary);
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 575.98px) {
    .rod-login-card {
        padding: 1.5rem 1.15rem;
        border-radius: 14px;
    }

    body.rod-login-page {
        background: linear-gradient(180deg, #001A8E 0%, #001A8E 28%, #eef1f8 28%, #eef1f8 100%) !important;
    }
}

/* ---------- Admin dashboard ---------- */
.rod-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid var(--rod-border);
    border-radius: 14px;
    padding: 1.15rem 1.25rem;
    box-shadow: var(--rod-shadow);
    color: var(--rod-text);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    height: 100%;
}

a.rod-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 26, 142, 0.12);
    color: var(--rod-text);
}

.rod-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #000d4d, #001A8E);
    color: #fff;
    flex-shrink: 0;
}

.rod-stat-icon--gold {
    background: linear-gradient(135deg, #a8841a, #C9A227);
    color: #12122a;
}

.rod-stat-label {
    font-size: 0.8rem;
    color: var(--rod-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.rod-stat-value {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--rod-primary);
    line-height: 1.1;
}

.rod-login-card .form-control:focus {
    border-color: var(--rod-primary) !important;
    box-shadow: 0 0 0 3px var(--rod-accent-soft) !important;
}

.rod-login-card label {
    font-weight: 600;
    color: var(--rod-text);
    font-size: 0.875rem;
}

/* ---------- Rod orders toolbar ---------- */
.rod-orders-toolbar {
    position: relative;
    z-index: 2;
    background: #fff !important;
}

.rod-orders-toolbar .btn-primary {
    white-space: nowrap;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 26, 142, 0.22);
}
.rod-order-cards {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.rod-order-card {
    background: #fff;
    border: 1px solid var(--rod-border);
    border-radius: 14px;
    box-shadow: var(--rod-shadow);
    padding: 1rem 1.1rem;
}

.rod-order-card--empty {
    padding: 2rem 1rem;
}

.rod-order-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.rod-order-card__name {
    font-weight: 700;
    color: var(--rod-text);
    font-size: 1.05rem;
    line-height: 1.25;
}

.rod-order-card__meta {
    font-size: 0.8rem;
    color: var(--rod-muted);
    margin-top: 0.2rem;
}

.rod-order-card__rows {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--rod-border);
}

.rod-order-card__rows > div {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.rod-order-card__rows > div:last-child {
    grid-column: 1 / -1;
}

.rod-order-card__rows span {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--rod-muted);
    font-weight: 600;
}

.rod-order-card__rows strong {
    font-size: 0.95rem;
    color: var(--rod-text);
    font-weight: 600;
    word-break: break-word;
}
