/* css/mycss.css */
:root {
    --bg-gradient-start: #f4f7fc;
    --bg-gradient-end: #eef2f5;
    --card-bg: rgba(255, 255, 255, 0.96);
    --card-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.15);
    --text-primary: #1a2c3e;
    --text-secondary: #4a627a;
    --input-bg: #ffffff;
    --input-border: #e2e8f0;
    --input-focus: #3b82f6;
    --button-bg: #1e3a5f;
    --button-hover: #0f2c48;
    --button-text: white;
    --link-color: #3b82f6;
    --footer-bg: rgba(255, 255, 255, 0.85);
    --footer-text: #2c3e50;
    --footer-link: #3b82f6;
    --icon-eye: #5b6e8c;
    --separator: #e2edf2;
    --switcher-bg: rgba(255, 255, 255, 0.9);
    --switcher-border: #cbd5e1;
    --sidebar-bg: linear-gradient(180deg, #0f172a 0%, #0a0f1c 100%);
    --sidebar-text: #e2e8f0;
    --sidebar-hover: rgba(59, 130, 246, 0.15);
    --sidebar-active: #3b82f6;
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --dashboard-bg: #f1f5f9;
    --card-bg-light: white;
    --card-border: #e2e8f0;
    --navbar-bg: #ffffff;
    --navbar-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --primary-color: #2c3e50;
    --primary-dark: #1a2c3e;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --gray-light: #ecf0f1;
    --gray-dark: #7f8c8d;
}

body.dark {
    --bg-gradient-start: #0b1120;
    --bg-gradient-end: #111827;
    --card-bg: #1f2937;
    --card-shadow: 0 25px 40px -12px rgba(0, 0, 0, 0.5);
    --text-primary: #f1f5f9;
    --text-secondary: #9ca3af;
    --input-bg: #2d3a48;
    --input-border: #334155;
    --input-focus: #60a5fa;
    --button-bg: #2c3e66;
    --button-hover: #1e2f4a;
    --button-text: #f0f9ff;
    --link-color: #60a5fa;
    --footer-bg: rgba(17, 24, 39, 0.9);
    --footer-text: #cbd5e6;
    --footer-link: #93c5fd;
    --icon-eye: #9bb5d4;
    --separator: #334155;
    --switcher-bg: #1e293b;
    --switcher-border: #475569;
    --dashboard-bg: #0f172a;
    --card-bg-light: #1e293b;
    --card-border: #334155;
    --navbar-bg: #1e293b;
    --navbar-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient-start);
    min-height: 100vh;
    transition: background 0.2s ease, color 0.2s ease;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--separator);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--sidebar-active);
    border-radius: 10px;
}

/* LOGIN PAGE STYLES */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 1rem;
}

.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 2rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--card-border);
    transition: all 0.3s;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo-icon {
    font-size: 3rem;
    color: var(--sidebar-active);
    margin-bottom: 0.75rem;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.login-subtitle {
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-size: 0.9rem;
}

.login-form .input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
}

.login-form input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 2.8rem;
    border: 1px solid var(--input-border);
    border-radius: 1rem;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: 0.2s;
}

    .login-form input:focus {
        outline: none;
        border-color: var(--input-focus);
        box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
    }

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-secondary);
}

.login-btn {
    width: 100%;
    padding: 0.9rem;
    background: var(--button-bg);
    border: none;
    border-radius: 1rem;
    color: var(--button-text);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

    .login-btn:hover {
        background: var(--button-hover);
        transform: translateY(-1px);
    }

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.demo-badge {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--input-border);
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
}

/* ERP DASHBOARD LAYOUT */
.erp-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* SIDEBAR */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
}

    .sidebar.collapsed {
        width: 80px;
    }

        .sidebar.collapsed .logo-text-sidebar,
        .sidebar.collapsed .nav-label,
        .sidebar.collapsed .user-details,
        .sidebar.collapsed .menu-section-title {
            display: none;
        }

        .sidebar.collapsed .nav-item {
            justify-content: center;
        }

            .sidebar.collapsed .nav-item i:first-child {
                margin-right: 0;
            }

        .sidebar.collapsed .submenu {
            display: none;
        }

.logo-area-sidebar {
    padding: 1.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--sidebar-border);
    margin-bottom: 1rem;
}

.logo-icon-sidebar {
    font-size: 1.8rem;
    color: #3b82f6;
}

.logo-text-sidebar {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, #fff, #94a3b8);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.nav-menu {
    flex: 1;
    padding: 0 0.75rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
    cursor: pointer;
    margin-bottom: 2px;
    border: none;
    background: transparent;
    width: 100%;
    font-family: inherit;
    text-align: left;
}

    .nav-item i:first-child {
        width: 24px;
        font-size: 1.1rem;
        text-align: center;
    }

    .nav-item:hover {
        background: var(--sidebar-hover);
        color: white;
    }

    .nav-item.active {
        background: var(--sidebar-active);
        color: white;
        box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
    }

.menu-section-title {
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
}

.sidebar-user-section {
    padding: 1rem;
    border-top: 1px solid var(--sidebar-border);
    margin-top: auto;
    cursor: pointer;
    transition: background 0.2s;
}

    .sidebar-user-section:hover {
        background: var(--sidebar-hover);
    }

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-nav {
    width: 36px;
    height: 36px;
    background: var(--sidebar-active);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    transition: margin-left 0.3s;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed + .main-content {
    margin-left: 80px;
}

.navbar {
    background: var(--navbar-bg);
    box-shadow: var(--navbar-shadow);
    position: sticky;
    top: 0;
    z-index: 99;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--card-border);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle-btn {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 8px;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .menu-toggle-btn:hover {
        background: var(--input-border);
    }

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-left: 0.5rem;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-wrapper {
    position: relative;
}

.search-input {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 2rem;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    width: 240px;
    transition: all 0.2s;
}

    .search-input:focus {
        outline: none;
        border-color: var(--sidebar-active);
        width: 280px;
    }

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.notification-btn {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    position: relative;
    transition: 0.2s;
}

    .notification-btn:hover {
        background: var(--input-border);
        color: var(--text-primary);
    }

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: 600;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 2rem;
    transition: 0.2s;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
}

    .user-profile:hover {
        background: var(--sidebar-hover);
        border-color: var(--sidebar-active);
    }

.user-info-text {
    display: flex;
    flex-direction: column;
}

.user-name-nav {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.user-role-nav {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.user-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--card-border);
    min-width: 200px;
    overflow: hidden;
    display: none;
    z-index: 100;
}

    .dropdown-menu.show {
        display: block;
    }

.dropdown-item {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.2s;
    cursor: pointer;
}

    .dropdown-item:hover {
        background: var(--sidebar-hover);
    }

.dropdown-divider {
    height: 1px;
    background: var(--separator);
    margin: 0.25rem 0;
}

.content-area {
    padding: 2rem;
    flex: 1;
}

.dashboard-card {
    background: var(--card-bg-light);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--card-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg-light);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--card-border);
    transition: transform 0.2s;
    text-align: center;
}

    .stat-card:hover {
        transform: translateY(-2px);
    }

    .stat-card i {
        font-size: 2rem;
        color: var(--sidebar-active);
        margin-bottom: 0.75rem;
    }

    .stat-card h3 {
        font-size: 1.8rem;
        margin: 0.5rem 0;
    }

.badge {
    background: var(--sidebar-active);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    display: inline-block;
    color: white;
}

.theme-palette-box {
    position: fixed;
    bottom: 90px;
    right: 24px;
    z-index: 1000;
}

.switcher-trigger {
    background: var(--switcher-bg);
    backdrop-filter: blur(8px);
    width: 52px;
    height: 52px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--switcher-border);
    transition: 0.2s;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.color-picker-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-radius: 1.5rem;
    padding: 1.2rem;
    width: 260px;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--separator);
    display: none;
    flex-direction: column;
    gap: 1rem;
}

    .color-picker-panel.open {
        display: flex;
    }

.theme-preset {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.preset-color {
    width: 42px;
    height: 42px;
    border-radius: 60px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.1s;
}

    .preset-color.active-preset {
        border: 2px solid white;
        outline: 2px solid var(--input-focus);
        transform: scale(1.05);
    }

.custom-color-row {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.save-theme-btn {
    background: var(--button-bg);
    color: var(--button-text);
    border: none;
    padding: 0.6rem;
    border-radius: 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.2s, opacity 0.2s;
}

    .modal-overlay.active {
        visibility: visible;
        opacity: 1;
    }

.logout-modal {
    background: var(--card-bg);
    border-radius: 1.5rem;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-cancel,
.btn-logout {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.btn-cancel {
    background: var(--input-border);
    color: var(--text-primary);
}

.btn-logout {
    background: #dc2626;
    color: white;
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

    .mobile-overlay.active {
        display: block;
    }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .search-input {
        width: 180px;
    }

        .search-input:focus {
            width: 200px;
        }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        width: 280px;
        z-index: 1001;
        transition: transform 0.3s ease;
    }

        .sidebar.mobile-open {
            transform: translateX(0);
        }

    .main-content {
        margin-left: 0 !important;
    }

    .navbar {
        padding: 0.5rem 1rem;
    }

    .search-wrapper {
        display: none;
    }

    .user-info-text {
        display: none;
    }

    .user-profile {
        padding: 0.25rem;
    }

    .page-title {
        font-size: 1rem;
    }

    .content-area {
        padding: 1rem;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .theme-palette-box {
        bottom: 70px;
        right: 16px;
    }
}

@media (max-width: 480px) {
    .navbar-right {
        gap: 0.5rem;
    }

    .notification-btn {
        padding: 0.25rem;
    }

    .user-avatar-nav {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

@media (min-width: 576px) {
    body {
        padding: 15px;
    }
}

@media (min-width: 992px) {
    body {
        padding: 20px;
    }
}

/* Main Container */
.master-container {
    max-width: 1600px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

@media (min-width: 768px) {
    .master-container {
        border-radius: 20px;
    }
}

/* Header Section */
.master-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 20px;
    color: white;
}

@media (min-width: 576px) {
    .master-header {
        padding: 25px;
    }
}

@media (min-width: 992px) {
    .master-header {
        padding: 30px;
    }
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 768px) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
    }
}

.title-section h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.3px;
}

@media (min-width: 576px) {
    .title-section h1 {
        font-size: 24px;
    }
}

@media (min-width: 992px) {
    .title-section h1 {
        font-size: 28px;
    }
}

.title-section p {
    margin: 5px 0 0;
    opacity: 0.85;
    font-size: 12px;
}

@media (min-width: 576px) {
    .title-section p {
        font-size: 13px;
    }
}

.btn-create {
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    border: none;
    font-weight: 600;

    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 100%;
}

@media (min-width: 576px) {
    .btn-create {
        padding: 10px 24px;

    }
}

@media (min-width: 768px) {
    .btn-create {
        width: auto;
        padding: 12px 28px;
    }
}

.btn-create:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: white;
}

.btn-create:active {
    transform: scale(0.98);
}

/* Stats Cards */
.stats-section {
    padding: 15px;
    background: var(--gray-light);
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    border-bottom: 1px solid var(--gray-border);
}

@media (min-width: 480px) {
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
        padding: 20px;
        gap: 15px;
    }
}

@media (min-width: 768px) {
    .stats-section {
        grid-template-columns: repeat(4, 1fr);
        padding: 25px;
        gap: 20px;
    }
}

.stat-card {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

@media (min-width: 768px) {
    .stat-card {
        padding: 20px;
        gap: 15px;
    }
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.stat-card:active {
    transform: scale(0.98);
}

.stat-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .stat-icon {
        width: 50px;
        height: 50px;
        border-radius: 12px;
    }
}

.stat-icon i {
    font-size: 20px;
    color: white;
}

@media (min-width: 768px) {
    .stat-icon i {
        font-size: 24px;
    }
}

.stat-info {
    flex: 1;
}

    .stat-info h3 {
        font-size: 22px;
        font-weight: 700;
        margin: 0;
        color: var(--primary-color);
        line-height: 1.2;
    }

@media (min-width: 768px) {
    .stat-info h3 {
        font-size: 28px;
    }
}

.stat-info p {
    margin: 4px 0 0;
    color: var(--gray-dark);
    font-size: 11px;
    font-weight: 500;
}

@media (min-width: 768px) {
    .stat-info p {
        font-size: 13px;
    }
}

/* Table Container */
.table-container {
    padding: 15px;
    background: white;
    overflow-x: auto;
}

@media (min-width: 768px) {
    .table-container {
        padding: 20px;
    }
}

@media (min-width: 992px) {
    .table-container {
        padding: 25px;
    }
}

/* DataTables Responsive Customization */
.dataTables_wrapper {
    width: 100%;
}

/* Mobile Search */
@media (max-width: 767px) {
    .dataTables_wrapper .dataTables_filter {
        float: none;
        text-align: center;
        margin-bottom: 20px;
    }

        .dataTables_wrapper .dataTables_filter label {
            display: block;
            width: 100%;
        }

        .dataTables_wrapper .dataTables_filter input {
            width: 100% !important;
            margin-left: 0 !important;
            margin-top: 8px;
            padding: 10px 15px;
            font-size: 14px;
        }

    .dataTables_wrapper .dataTables_length {
        float: none;
        text-align: center;
        margin-bottom: 15px;
    }

        .dataTables_wrapper .dataTables_length select {
            width: auto;
            display: inline-block;
            margin: 0 5px;
            padding: 5px;
        }

    .dataTables_wrapper .dataTables_info {
        float: none;
        text-align: center;
        margin-bottom: 15px;
        font-size: 12px;
    }

    .dataTables_wrapper .dataTables_paginate {
        float: none;
        text-align: center;
        margin-top: 15px;
    }

        .dataTables_wrapper .dataTables_paginate .paginate_button {
            padding: 6px 10px;
            margin: 0 2px;
            font-size: 12px;
        }
}

/* Desktop Search */
@media (min-width: 768px) {
    .dataTables_wrapper .dataTables_filter {
        float: right;
        margin-bottom: 20px;
    }

        .dataTables_wrapper .dataTables_filter input {
            width: 250px;
            padding: 8px 15px;
            margin-left: 10px;
        }
}

.dataTables_wrapper .dataTables_filter input {
    border: 2px solid var(--gray-border);
    border-radius: 25px;
    transition: all 0.3s;
}

    .dataTables_wrapper .dataTables_filter input:focus {
        border-color: var(--secondary-color);
        outline: none;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    }

/* Table Styling */
.table {
    margin: 0;
    width: 100% !important;
}

    .table thead th {
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
        color: white;
        font-weight: 600;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 10px 8px;
        border: none;
        white-space: nowrap;
    }

@media (min-width: 768px) {
    .table thead th {
        font-size: 13px;
        padding: 12px 12px;
    }
}

.table tbody td {
    padding: 10px 8px;
    vertical-align: middle;
    font-size: 12px;
    color: #2c3e50;
    border-bottom: 1px solid var(--gray-border);
}

@media (min-width: 768px) {
    .table tbody td {
        padding: 12px 12px;
        font-size: 13px;
    }
}

/* Responsive Table - Hide columns on mobile */
@media (max-width: 767px) {
    .table thead th:nth-child(3),
    .table tbody td:nth-child(3) {
        display: none;
    }

    .table thead th:nth-child(5),
    .table tbody td:nth-child(5) {
        display: none;
    }
}

@media (max-width: 576px) {
    .table thead th:nth-child(6),
    .table tbody td:nth-child(6) {
        display: none;
    }

    .table thead th:nth-child(7),
    .table tbody td:nth-child(7) {
        display: none;
    }
}

/* Badge Styling */
.badge-type {
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}

    .badge-type.raw-material {
        background: #e3f2fd;
        color: #1976d2;
    }

    .badge-type.finished-goods {
        background: #e8f5e9;
        color: #2e7d32;
    }

    .badge-type.packaging {
        background: #fff3e0;
        color: #f57c00;
    }

    .badge-type.spare-parts {
        background: #f3e5f5;
        color: #7b1fa2;
    }

@media (min-width: 768px) {
    .badge-type {
        padding: 4px 10px;
        font-size: 11px;
    }
}

/* Capacity Bar */
.capacity-bar {
    width: 100%;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    height: 6px;
}

.capacity-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 0.3s ease;
}

.capacity-text {
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
    display: block;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.btn-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

@media (min-width: 768px) {
    .btn-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }
}

.btn-icon:hover {
    transform: translateY(-2px);
}

.btn-icon:active {
    transform: scale(0.9);
}

.btn-view {
    background: #e3f2fd;
    color: #1976d2;
}

    .btn-view:hover {
        background: #1976d2;
        color: white;
    }

.btn-edit {
    background: #fff3e0;
    color: #f57c00;
}

    .btn-edit:hover {
        background: #f57c00;
        color: white;
    }

.btn-delete {
    background: #ffebee;
    color: #d32f2f;
}

    .btn-delete:hover {
        background: #d32f2f;
        color: white;
    }

/* Modal Styling */
.modal-content {
    border-radius: 16px;
    border: none;
    overflow: hidden;
    margin: 10px;
}

@media (min-width: 768px) {
    .modal-content {
        border-radius: 20px;
        margin: 0;
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 15px 20px;
    border: none;
}

@media (min-width: 768px) {
    .modal-header {
        padding: 20px 25px;
    }
}

.modal-header .modal-title {
    font-weight: 600;
    font-size: 16px;
}

@media (min-width: 768px) {
    .modal-header .modal-title {
        font-size: 20px;
    }
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.modal-body {
    padding: 20px;
    background: #f8f9fa;
    max-height: 70vh;
    overflow-y: auto;
}

@media (min-width: 768px) {
    .modal-body {
        padding: 25px;
    }
}

.form-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (min-width: 768px) {
    .form-label {
        font-size: 13px;
        margin-bottom: 8px;
    }
}

.required:after {
    content: " *";
    color: var(--danger-color);
}

.form-control, .form-select {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    transition: all 0.3s;
}

@media (min-width: 768px) {
    .form-control, .form-select {
        padding: 10px 15px;
        font-size: 14px;
        border-radius: 10px;
    }
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.modal-footer {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid var(--gray-border);
}

@media (min-width: 768px) {
    .modal-footer {
        padding: 15px 25px;
    }
}

/* Toast Customization for Mobile */
@media (max-width: 576px) {
    .toast-top-right {
        top: 10px;
        right: 10px;
        left: auto;
        width: calc(100% - 20px);
        max-width: 320px;
    }

    .toast-message {
        font-size: 12px;
    }

    .toast-title {
        font-size: 14px;
    }
}

/* Utility Classes */
.text-truncate-mobile {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 768px) {
    .text-truncate-mobile {
        max-width: none;
        white-space: normal;
    }
}

.cursor-pointer {
    cursor: pointer;
}
/* Collapsible Submenu Styles */
.nav-item.has-submenu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

    .nav-item.has-submenu .nav-label {
        flex: 1;
    }

.submenu-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.nav-item.has-submenu.open .submenu-arrow {
    transform: rotate(180deg);
}

.submenu {
    display: none;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
}

    .submenu.open {
        display: block;
    }

.submenu-section-title {
    margin-top: 0.8rem;
    margin-bottom: 0.3rem;
    padding-left: 1rem;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
}

.submenu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.5rem 1rem 0.5rem 2rem;
    border-radius: 10px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s;
    cursor: pointer;
    margin-bottom: 2px;
    border: none;
    background: transparent;
    width: 100%;
    font-family: inherit;
    text-align: left;
}

    .submenu-item i:first-child {
        width: 20px;
        font-size: 0.9rem;
        text-align: center;
    }

    .submenu-item:hover {
        background: var(--sidebar-hover);
        color: white;
    }

    .submenu-item.active {
        background: var(--sidebar-active);
        color: white;
        box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
    }

/* Sidebar collapsed state */
.sidebar.collapsed .has-submenu .nav-label,
.sidebar.collapsed .submenu-arrow,
.sidebar.collapsed .submenu,
.sidebar.collapsed .submenu-section-title {
    display: none;
}

.sidebar.collapsed .has-submenu {
    justify-content: center;
}

    .sidebar.collapsed .has-submenu i:first-child {
        margin-right: 0;
    }
/* Notification Popup Styles */
.notification-container {
    position: relative;
}

.notification-dropdown {
    position: absolute;
    top: 45px;
    right: 0;
    width: 350px;
    max-width: 90vw;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--card-border);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

    .notification-dropdown.show {
        display: block;
        animation: fadeIn 0.2s ease;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-header {
    padding: 12px 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .notification-header h6 {
        margin: 0;
        font-size: 14px;
    }

.mark-all-read {
    background: transparent;
    border: none;
    color: white;
    font-size: 11px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

    .mark-all-read:hover {
        opacity: 1;
        text-decoration: underline;
    }

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--separator);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    gap: 12px;
}

    .notification-item:hover {
        background: var(--sidebar-hover);
    }

    .notification-item.unread {
        background: rgba(59, 130, 246, 0.05);
    }

        .notification-item.unread .notification-title {
            font-weight: 700;
        }

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .notification-icon i {
        font-size: 16px;
    }

    .notification-icon.order {
        background: #e3f2fd;
        color: #1976d2;
    }

    .notification-icon.production {
        background: #e8f5e9;
        color: #2e7d32;
    }

    .notification-icon.quality {
        background: #fff3e0;
        color: #f57c00;
    }

    .notification-icon.dispatch {
        background: #f3e5f5;
        color: #7b1fa2;
    }

    .notification-icon.approval {
        background: #ffebee;
        color: #c62828;
    }

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.notification-time {
    font-size: 10px;
    color: var(--text-secondary);
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
}

    .notification-empty i {
        font-size: 40px;
        margin-bottom: 10px;
        opacity: 0.5;
    }

.notification-footer {
    padding: 10px 15px;
    text-align: center;
    border-top: 1px solid var(--separator);
}

    .notification-footer a {
        font-size: 12px;
        color: var(--link-color);
        text-decoration: none;
    }

        .notification-footer a:hover {
            text-decoration: underline;
        }

@media (max-width: 768px) {
    .notification-dropdown {
        width: 320px;
        right: -50px;
    }
}
