/* ========================= GENERAL STYLES ========================= */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Poppins", sans-serif;
    font-size: 13px;
    background: #f8fafc;
    color: #334155;
    -webkit-font-smoothing: antialiased;
}

.app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.action-dropdown {
    position: relative !important;
}

.image-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-popup img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

.close-popup {
    position: absolute;
    top: 15px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

/* Chrome, Safari, Edge, Opera */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type="number"] {
    -moz-appearance: textfield;
}

/* ========================= SIDEBAR ========================= */
.sidebar {
    width: 240px;
    height: 100vh;
    flex-shrink: 0;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 200;
}

.sidebar-header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid #e5e5e5;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    white-space: nowrap;
}

.logo-icon {
    width: 40px;
    height: 40px;
    object-fit: cover;
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    color: #fff;
    border-radius: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 15px;
}

.logo-text {
    font-size: 25px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.025em;
}

/* ========================= SIDEBAR MENU ========================= */
.sidebar-menu {
    list-style: none;
    padding: 12px 10px;
    margin: 0;
    overflow-y: auto;
    flex: 1;
}

/* 1. Base style for all main menu items */
.sidebar-menu > li {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    margin-bottom: 6px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    color: #1e293b;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

/* Regular links inside li */
.sidebar-menu > li > a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    width: 100%;
}

.sidebar-menu > li > a:hover {
    color: inherit;
}

.sidebar-menu > li > a.active {
    color: #4f46e5 !important;
    font-weight: 600 !important;
}

.sidebar-menu > li:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.sidebar-menu > li.active {
    background: #eef2ff;
    color: #4f46e5;
    font-weight: 600;
}

/* Icons & Arrows alignment */
.sidebar-menu svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.arrow {
    margin-left: auto;
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.sidebar-menu li.open .arrow {
    transform: rotate(180deg);
}

/* ========================================================
   2. HAS-SUB (ADMINISTRATION / CATALOG BOX CONTAINER)
   ======================================================== */
.sidebar-menu li.has-sub {
    height: auto !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    padding: 10px 12px !important;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    margin-bottom: 6px;
    transition: background 0.2s ease;
}

/* Top header row elements (Icon, Text, Arrow) aik line mein rakhne ke liye */
.sidebar-menu li.has-sub > i:not(.arrow) {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.sidebar-menu li.has-sub > span {
    display: flex;
    align-items: center;
    flex: 1;
    white-space: nowrap;
}

.sidebar-menu li.has-sub > .arrow {
    display: flex;
    align-items: center;
    margin-left: auto;
}

/* Hover par halka sa background */
.sidebar-menu li.has-sub:hover {
    background: #f1f5f9;
}

/* Jab dropdown open/active ho ga sirf tab background aayega (No Border) */
.sidebar-menu li.has-sub.open,
.sidebar-menu li.has-sub.active {
    background: #F2F5F9 !important;
    border-color: transparent !important;
}

/* Submenu Wrapper inside the box */
.submenu {
    display: none;
    width: 100%;
    padding-top: 6px;
    border-top: 1px solid #e2e8f0;
    list-style: none;
    padding-left: 0;
}

/* 3. Compact Submenu Links */
.submenu a {
    height: 30px !important;
    padding: 4px 10px 4px 28px !important;
    display: flex !important;
    align-items: center !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    cursor: pointer !important;
    text-decoration: none !important;
    border-radius: 6px;
    transition: all 0.15s ease !important;
    white-space: nowrap;
}

.submenu a:hover {
    color: #4f46e5 !important;
}

.submenu a.active {
    color: #4f46e5 !important;
    font-weight: 700 !important;
}

/* SIDEBAR OVERLAY */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 200;
    opacity: 1;
    transition: opacity 0.25s ease;
}

.sidebar-overlay.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

/* COLLAPSED SIDEBAR STYLE (DESKTOP ONLY) */
@media (min-width: 769px) {
    .sidebar.collapsed {
        width: 68px;
    }

    .sidebar.collapsed .logo-text,
    .sidebar.collapsed .sidebar-menu span,
    .sidebar.collapsed .arrow {
        display: none !important;
    }

    .sidebar.collapsed .sidebar-header {
        justify-content: center;
    }

    /* Collapse mode mein icons ko center align karne ke liye */
    .sidebar.collapsed .sidebar-menu > li,
    .sidebar.collapsed .sidebar-menu li.has-sub {
        justify-content: center !important;
        padding: 0 !important;
    }

    .sidebar.collapsed .sidebar-menu > li > a {
        justify-content: center !important;
        padding: 0 !important;
    }
}

/* ========================= CONTENT AREA ========================= */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #f8fafc;
}

/* TOPBAR */
.topbar {
    height: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.mobile-toggle-btn {
    display: none;
}

.search-box {
    width: 320px;
    height: 38px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.search-box:focus-within {
    border-color: #cbd5e1;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.05);
}

.search-box svg {
    width: 16px;
    height: 16px;
    color: #64748b;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: none;
    background: none;
    font-size: 13px;
    color: #1e293b;
}

.user-info {
   display: flex;
   flex-direction: column;
   line-height: 1.2;
   margin-right: 10px;
}

.welcome-text {
   font-size: 14px;
   font-weight: 700;
   color: #333;
}

.role-text {
   font-size: 12px;
   color: #777;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.activity-info {
   display: none;
   padding: 5px 15px;
   background: #4f46e5;
   border-radius: 3px;
   flex-direction: column;
   justify-content: center;
   margin-right: 15px;
   font-size: 11px;
   color: #64748b;
   line-height: 1.5;
   text-align: left;
}

.activity-info div:first-child {
   font-weight: 600;
   color: #fff;
}

.activity-info div:last-child {
   font-weight: 600;
   color: #fff;
}

.notification-container {
    position: relative;
}

.notification-bell {
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.15s ease;
}

.notification-bell:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    background: #ef4444;
    border-radius: 50%;
    border: 1px solid #ffffff;
}

/* Notification Dropdown */
.notification-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 42px;
    width: 320px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    border: 1px solid #e1e1e1;
    overflow: hidden;
    z-index: 999;
}

.notification-dropdown.show {
    display: block;
}

.notification-header {
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background .15s ease;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-item svg {
    width: 20px;
    height: 20px;
    color: #64748b;
    margin-top: 2px;
}

.notification-item strong {
    display: block;
    font-size: 13px;
    color: #334155;
}

.notification-item p {
    margin: 3px 0;
    font-size: 12px;
    color: #64748b;
}

.notification-item span {
    font-size: 11px;
    color: #94a3b8;
}

.notification-item.unread {
    background: #eff6ff;
}

.notification-footer {
    padding: 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    cursor: pointer;
    background: #ffffff;
}

.notification-footer:hover {
    background: #f8fafc;
}

.mobile-toggle-btn svg,
.modal-close-btn svg {
    pointer-events: none;
}

.profile-container {
    position: relative;
    display: flex;
    align-items: center;
}

.profile {
    height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.profile:hover {
    background: #f1f5f9;
}

.profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #e2e8f0;
}

.profile span {
    font-weight: 500;
    color: #334155;
}

.profile svg {
    width: 14px;
    height: 14px;
    color: #64748b;
}

/* PROFILE DROPDOWN */
.profile-dropdown {
    display: none;
    position: absolute;
    top: 48px;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    z-index: 250;
    padding: 6px;
    transform: translateY(8px);
    opacity: 0;
    transition: transform 0.15s ease, opacity 0.15s ease;
    pointer-events: none;
}

.profile-dropdown.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.profile-dropdown button,
.profile-dropdown a {
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    border: 0;
    background: transparent;
    color: #475569;
    font-size: 12px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
    text-decoration: none;
}

.profile-dropdown button:hover,
.profile-dropdown a:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.profile-dropdown button.logout-btn {
    color: #ef4444;
}

.profile-dropdown button.logout-btn:hover {
    background: #fef2f2;
    color: #dc2626;
}

.profile-dropdown svg {
    width: 14px;
    height: 14px;
    color: #64748b;
    pointer-events: none;
}

.profile-dropdown button.logout-btn svg {
    color: #ef4444;
}

.profile-dropdown button.logout-btn:hover svg {
    color: #dc2626;
}

/* OFFICE MENU / SECONDARY NAV */
.office-menu {
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.office-title {
    margin: 0;
    margin-right: 12px;
    padding-right: 18px;
    border-right: 1px solid #e2e8f0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}

.office-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.office-actions button {
    height: 36px;
    padding: 0 14px;
    gap: 6px;
}

.office-actions button svg {
    width: 16px;
    height: 16px;
}

.office-item {
    position: relative;
    cursor: pointer;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: #64748b;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s ease;
}

.office-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.office-item .dropdown {
    display: none;
    position: absolute;
    top: 36px;
    left: 0;
    min-width: 200px;
    background: #ffffff;
    padding: 6px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    z-index: 50;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.15s ease;
    pointer-events: none;
}

.office-item:hover .dropdown {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown p {
    padding: 8px 12px;
    margin: 0;
    border-radius: 6px;
    color: #475569;
    font-size: 12px;
    transition: all 0.1s ease;
}

.dropdown p:hover {
    background: #eef2ff;
    color: #4f46e5;
}

/* CONTENT CONTAINER */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 8px 24px 24px 24px;
    background: #F2F5F9;
}

/* FOOTER */
footer {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    font-size: 12px;
    color: #64748b;
    flex-shrink: 0;
}

.footer-left,
.footer-right {
    white-space: nowrap;
}

.footer-right {
    color: #94a3b8;
}

/* ========================= OFFCANVAS ========================= */
.filter-btn {
    position: fixed;
    top: 50%;
    right: 0px;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    background: #4f46e5;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
    transition: all .3s ease;
    z-index: 20;
}

.filter-btn:hover {
    transform: translateY(-50%) scale(1.08);
    background: #4338ca;
}

.filter-btn svg {
    width: 16px;
    height: 16px;
}

.offcanvas {
    position: fixed;
    right: -320px;
    top: 0;
    width: 320px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -10px 0 25px -5px rgba(0, 0, 0, 0.1), -4px 0 10px -5px rgba(0, 0, 0, 0.04);
    padding: 24px;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 250;
    display: flex;
    flex-direction: column;
}

.offcanvas.show {
    right: 0;
}

.offcanvas-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 16px;
}

.offcanvas-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.offcanvas-close-btn {
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #64748b;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.offcanvas-close-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.offcanvas label {
    display: block;
    margin-top: 16px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}

.offcanvas input,
.offcanvas select {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    margin-top: 6px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
}

.offcanvas input:focus,
.offcanvas select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.offcanvas-actions {
    margin-top: auto;
    display: flex;
    gap: 12px;
}

.offcanvas-actions button {
    flex: 1;
}

/* ========================= MODAL SHAKE ANIMATION ========================= */
@keyframes modal-shake {
    0%,
    100% {
        transform: scale(1) translateX(0);
    }
    15% {
        transform: scale(1) translateX(-9px);
    }
    30% {
        transform: scale(1) translateX(9px);
    }
    45% {
        transform: scale(1) translateX(-6px);
    }
    60% {
        transform: scale(1) translateX(6px);
    }
    75% {
        transform: scale(1) translateX(-3px);
    }
    90% {
        transform: scale(1) translateX(3px);
    }
}

.modal-content.shake {
    animation: modal-shake 0.48s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* ========================= MODAL ========================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 480px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e5e5;
    background: #fff;
}

.modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.modal-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 0;
    background: transparent;
    color: #64748b;
    transition: all 0.15s ease;
}

.modal-close-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #e5e5e5;
    background: #fff;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #475569;
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.btn-primary {
    background: #4f46e5;
    color: white;
    border: 0;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.btn-primary:hover {
    background: #4338ca;
}

.btn-secondary {
    background: white;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

/* ========================= COLLAPSED SIDEBAR HOVER SUBMENU FLOAT ========================= */
.collapsed-submenu-float {
    position: fixed;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.12), 0 4px 10px -5px rgba(0, 0, 0, 0.06);
    padding: 6px;
    z-index: 9999;
    min-width: 175px;
    display: none;
    animation: float-in 0.15s ease;
}

@keyframes float-in {
    from {
        opacity: 0;
        transform: translateX(-6px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.collapsed-float-label {
    padding: 6px 12px 8px;
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 4px;
}

.collapsed-submenu-float a {
    display: flex;
    align-items: center;
    height: 34px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.collapsed-submenu-float a:hover {
    background: #eef2ff;
    color: #4f46e5;
}

/* Toast alert for CRUD feedback */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error,
.toast.danger {
    border-left: 4px solid #ef4444;
}

.toast.warning {
    border-left: 4px solid #f59e0b;
}

.toast.info {
    border-left: 4px solid #3b82f6;
}

.toast-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.toast-icon.success { color: #10b981; }
.toast-icon.error,
.toast-icon.danger { color: #ef4444; }
.toast-icon.warning { color: #f59e0b; }
.toast-icon.info { color: #3b82f6; }

/* ========================= FORM UTILITIES ========================= */
.offcanvas-body {
    flex: 1;
}

.offcanvas-body-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.offcanvas-label-spaced {
    margin-top: 16px;
    display: block;
}

.offcanvas-label-spaced-lg {
    margin-top: 20px;
    display: block;
}

.modal-body-scroll {
    max-height: 68vh;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-body-scroll-sm {
    max-height: 65vh;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-label {
    font-size: 11px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.form-required {
    color: #ef4444;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    outline: none;
    background: #fff;
    transition: border-color .2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #6366f1;
}

.form-textarea {
    resize: vertical;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.file-upload {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px dashed #d1d5db;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    background: #f9fafb;
    transition: border-color .2s;
}

.file-upload:hover {
    border-color: #a5b4fc;
}

.file-upload-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #eef2ff;
    border-radius: 8px;
    flex-shrink: 0;
}

.file-upload-info {
    flex: 1;
}

.file-upload-name {
    font-size: 11px;
    font-weight: 600;
    color: #374151;
    display: block;
}

.file-upload-hint {
    font-size: 10px;
    color: #9ca3af;
}

.file-input-hidden {
    display: none;
}

.image-preview-box {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    padding: 8px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.image-preview-box.show {
    display: flex;
}

.image-preview-box img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.image-preview-meta {
    flex: 1;
}

.image-preview-label {
    font-size: 10px;
    color: #6b7280;
    display: block;
}

.btn-remove-image {
    font-size: 10px;
    color: #ef4444;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-top: 2px;
}

.btn-remove-image:hover {
    color: #dc2626;
}

.table-edit-link {
    font-weight: 600;
    color: #4f46e5;
    text-decoration: none;
}

.table-edit-link:hover {
    text-decoration: underline;
}

.btn-delete-row {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    cursor: pointer;
    transition: background .15s;
}

.btn-delete-row:hover {
    background: #fee2e2;
}

.profile-divider {
    margin: 4px 0;
    border: 0;
    border-top: 1px solid #f1f5f9;
}

.logo-clickable {
    cursor: pointer;
}

/* ========================= MOBILE RESPONSIVE ========================= */
@media(max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -240px;
        top: 0;
        height: 100vh;
        box-shadow: 5px 0 20px rgba(0, 0, 0, .08);
    }

    .sidebar.mobile-open {
        left: 0;
    }

    .sidebar.collapsed {
        width: 240px;
    }

    .sidebar.collapsed .logo-text,
    .sidebar.collapsed .sidebar-menu span,
    .sidebar.collapsed .arrow {
        display: block;
    }

    .sidebar.collapsed .sidebar-menu li {
        justify-content: flex-start;
        padding: 0 12px;
    }

    .mobile-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border-radius: 8px;
        background: #f1f5f9;
        color: #475569;
        cursor: pointer;
        border: 0;
        transition: background 0.15s ease;
    }

    .mobile-toggle-btn:hover {
        background: #cbd5e1;
    }

    .mobile-toggle-btn svg {
        width: 20px;
        height: 20px;
    }

    .content-area {
        width: 100%;
    }

    .topbar {
        padding: 0 16px;
    }

    .search-box {
        display: none;
    }

    .content {
        padding: 16px;
    }
}

/* ========================= FORM VALIDATION ERRORS ========================= */
.form-error {
    color: #ef4444;
    font-size: 11px;
    margin-top: 4px;
    display: block;
}

.form-error.hidden {
    display: none;
}

/* Select2 */
.single-select + .select2-container .select2-selection,
.multiple-select + .select2-container .select2-selection {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    min-height: 38px;
    padding: 8px 12px;
    font-size: 12px;
    outline: none;
    background: #fff;
    transition: border-color .2s;
}

.single-select + .select2-container .select2-selection--single {
    height: 38px;
}

.single-select + .select2-container .select2-selection--single .select2-selection__rendered {
    padding-left: 0;
    line-height: 20px;
    color: #111827;
}

.single-select + .select2-container .select2-selection--single .select2-selection__arrow {
    height: 36px;
    right: 10px;
}

.multiple-select + .select2-container .select2-selection--multiple {
    min-height: 38px;
    padding: 4px 8px;
}

.multiple-select + .select2-container .select2-selection__choice {
    background: #f3f4f6;
    border: none;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 12px;
}

.single-select + .select2-container--focus .select2-selection,
.multiple-select + .select2-container--focus .select2-selection {
    border-color: #2563eb;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    height: 22px !important;
    margin-right: 25px !important;
}