/* Admin Panel Styles */

/* Completely disable Bootstrap modal CSS */
.modal,
.modal-dialog,
.modal-content,
.modal-header,
.modal-body,
.modal-footer,
.modal-backdrop,
.modal-backdrop.show,
.modal-backdrop.fade {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    z-index: -1 !important;
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    -webkit-filter: none !important;
}

/* Force remove any blur effects */
*,
*::before,
*::after,
body,
html,
.main-content,
.sidebar,
.topbar,
.content-wrapper,
.container-fluid,
.row,
.col,
div,
section,
article,
aside,
header,
footer,
nav,
main {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    -webkit-filter: none !important;
}

/* Specifically target body when modal is open */
body.custom-modal-open,
body.custom-modal-open *,
body.custom-modal-open .main-content,
body.custom-modal-open .sidebar,
body.custom-modal-open .topbar {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    -webkit-filter: none !important;
}

/* Global Styles */
:root {
    --primary-color: #c41e3a;
    --primary-dark: #a01729;
    --secondary-color: #6c757d;
    --success-color: #48bb78;
    --danger-color: #f56565;
    --warning-color: #ed8936;
    --info-color: #4299e1;
    --light-color: #f7fafc;
    --dark-color: #8b0000;
    --sidebar-width: 260px;
    --topbar-height: 70px;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--dark-color);
}

/* Login Page */
.admin-login-bg {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 50%, #dc143c 100%);
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-login-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.3;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    margin: 2rem;
    overflow: hidden;
}

.login-card-header {
    padding: 2rem 2rem 1rem;
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.login-logo img {
    max-width: 120px;
    height: auto;
}

.login-title {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.login-subtitle {
    color: #7f8c8d;
    font-size: 1rem;
    margin-bottom: 0;
}

/* Dashboard Layout */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.sidebar-menu {
    padding: 1rem 0;
    list-style: none;
    margin: 0;
}

.sidebar-menu-item {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    border-radius: 0 25px 25px 0;
    margin: 0.25rem 0;
    margin-right: 1rem;
    position: relative;
    overflow: hidden;
}

.sidebar-menu-item:hover, .sidebar-menu-item.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.sidebar-menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.sidebar-menu-item:hover::before {
    left: 100%;
}

.sidebar-menu-item i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.sidebar-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(196, 30, 58, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(66, 153, 225, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(72, 187, 120, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.main-content > * {
    position: relative;
    z-index: 1;
}

/* Header Section */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color), var(--success-color));
}

.header:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.header-left {
    flex: 1;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: #000000;
    font-size: 1rem;
    margin-bottom: 0;
    opacity: 0.8;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: rgba(196, 30, 58, 0.1);
    border-radius: 50px;
    border: 1px solid rgba(196, 30, 58, 0.2);
    transition: var(--transition);
}

.user-info:hover {
    background: rgba(196, 30, 58, 0.15);
    transform: scale(1.05);
}

.user-info span {
    font-weight: 600;
    color: #000000;
}

.user-info i {
    font-size: 1.5rem;
    color: #000000;
}

/* Content Section */
.content {
    background: transparent;
    border-radius: var(--border-radius);
    padding: 0;
}

.content .row {
    margin: 0 -1rem;
}

.content .col-md-6 {
    padding: 0 1rem;
}

/* Card Enhancements */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    opacity: 0;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    background: rgba(248, 250, 252, 0.8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Brand List Enhancements */
.brand-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.brand-list::-webkit-scrollbar {
    width: 6px;
}

.brand-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.brand-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.brand-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.brand-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.brand-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(196, 30, 58, 0.1), transparent);
    transition: left 0.6s;
}

.brand-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.brand-item:hover::before {
    left: 100%;
}

.brand-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.brand-logo {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(196, 30, 58, 0.2);
    transition: var(--transition);
}

.brand-item:hover .brand-logo {
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.brand-details h6 {
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: var(--dark-color);
}

.brand-details p {
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Featured List */
.featured-list {
    min-height: 300px;
    padding: 1rem;
    border: 2px dashed rgba(196, 30, 58, 0.2);
    border-radius: var(--border-radius);
    background: rgba(196, 30, 58, 0.02);
    transition: var(--transition);
}

.featured-list:hover {
    border-color: var(--primary-color);
    background: rgba(196, 30, 58, 0.05);
}

/* Alert Enhancements */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: currentColor;
}

.alert-info {
    background: rgba(66, 153, 225, 0.1);
    color: var(--info-color);
    border: 1px solid rgba(66, 153, 225, 0.2);
}

/* Button Enhancements */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(196, 30, 58, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #38a169);
    border: none;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
}

/* Badge Enhancements */
.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
}

.bg-success {
    background: linear-gradient(135deg, var(--success-color), #38a169) !important;
}

/* Form Control Enhancements */
.form-control {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.8);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(196, 30, 58, 0.25);
    background: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .content .row {
        margin: 0;
    }
    
    .content .col-md-6 {
        padding: 0;
        margin-bottom: 1rem;
    }
}

/* Topbar */
.topbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: var(--box-shadow);
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    z-index: 999;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.topbar-toggler {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem 0.75rem;
    margin-right: 1rem;
}

.topbar-search {
    flex: 1;
    margin: 0 1rem;
}

.topbar-search .input-group {
    width: 300px;
}

.topbar-divider {
    width: 0;
    border-right: 1px solid #e3e6f0;
    height: 2rem;
    margin: auto 1rem;
}

.topbar-user {
    display: flex;
    align-items: center;
}

.topbar-user-name {
    margin-right: 0.5rem;
    font-weight: 500;
}

.topbar-user-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Content Wrapper */
.content-wrapper {
    padding-top: calc(var(--topbar-height) + 2rem);
    min-height: calc(100vh - var(--topbar-height));
}

/* Dashboard Cards */
.dashboard-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
    transition: var(--transition);
    background: white;
    overflow: hidden;
    position: relative;
}

.dashboard-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color), var(--success-color));
}

.dashboard-card-icon {
    font-size: 2rem;
    opacity: 0.3;
}

/* Tables */
.admin-table {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.admin-table tbody tr {
    transition: var(--transition);
}

.admin-table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
    transform: scale(1.01);
}

.admin-table th {
    background-color: #f8f9fc;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    color: #4e73df;
}

/* Table Image Styles - More specific targeting */
.table .table-img,
.admin-table .table-img,
table .table-img,
img.table-img {
    width: 30px !important;
    height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    object-fit: cover !important;
    border-radius: 0.25rem !important;
    border: 1px solid #dee2e6 !important;
    display: block !important;
    margin: 0 auto !important;
}

.product-image {
    width: 30px !important;
    height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    object-fit: cover !important;
    border-radius: 4px !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Table first column width restriction */
.table th:first-child,
.table td:first-child {
    width: 70px !important;
    max-width: 70px !important;
    min-width: 70px !important;
    text-align: center !important;
    padding: 8px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}

/* Category specific image styles */
.category-image {
    max-width: 60px !important;
    max-height: 60px !important;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Forms */
.form-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.form-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.form-card-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e3e6f0;
    padding-bottom: 1rem;
}

.form-card-title {
    margin-bottom: 0;
    font-weight: 600;
    color: var(--dark-color);
}

/* Image Preview */
.image-preview {
    width: 180px;
    height: 180px;
    border: 3px dashed rgba(102, 126, 234, 0.3);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.image-preview:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-placeholder {
    color: #aaa;
    font-size: 0.9rem;
    text-align: center;
}

.image-preview-placeholder i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .content-wrapper {
        padding: calc(var(--topbar-height) + 1rem) 1rem 1rem;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .topbar {
        left: 0;
        padding: 0 1rem;
    }
    
    .topbar-search .input-group {
        width: 100%;
        max-width: 300px;
    }
    
    .dashboard-card {
        margin-bottom: 1rem;
    }
    
    .form-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .topbar {
        padding: 0 0.5rem;
    }
    
    .topbar-search {
        display: none;
    }
    
    .content-wrapper {
        padding: calc(var(--topbar-height) + 0.5rem) 0.5rem 0.5rem;
    }
    
    .login-card {
        margin: 1rem;
        max-width: 100%;
    }
    
    .image-preview {
        width: 120px;
        height: 120px;
    }
}

/* Collapsed Sidebar */
.sidebar-collapsed .sidebar {
    width: 70px;
}

.sidebar-collapsed .sidebar-brand,
.sidebar-collapsed .sidebar-menu-item span {
    display: none;
}

.sidebar-collapsed .main-content,
.sidebar-collapsed .topbar {
    margin-left: 70px;
    left: 70px;
}

/* Modal Styles */
.modal {
    z-index: 1055;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 1050 !important;
}

.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    background-color: #ffffff;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    color: white !important;
    border-bottom: none !important;
    padding: 1.5rem 2rem !important;
}

.modal-header .btn-close {
    filter: invert(1) !important;
    opacity: 1 !important;
}

.modal-body {
    padding: 2rem !important;
    background-color: #ffffff !important;
    color: #333333;
}

.modal-dialog {
    max-width: 800px;
    margin: 1.75rem auto;
}

.modal-lg {
    max-width: 900px;
}

.modal-footer {
    background-color: #ffffff !important;
    border-top: 1px solid #dee2e6 !important;
    padding: 1rem 2rem !important;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: var(--transition);
    font-size: 0.95rem;
    background-color: #ffffff;
    color: #333333;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
    transform: translateY(-1px);
}

.form-select {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: var(--transition);
    font-size: 0.95rem;
    background-color: #ffffff;
    color: #333333;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
    transform: translateY(-1px);
}

/* Image Preview Styles */
.img-thumbnail {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 10px;
    background-color: #f8f9fa;
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
    display: block;
}

/* Modal Image Preview Container */
#image-preview-container {
    max-height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

#image-preview {
    max-width: 150px;
    max-height: 150px;
    object-fit: contain;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background-color: #f8f9fa;
}

/* Button Styles */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    color: white !important;
    box-shadow: 0 4px 6px -1px rgba(196, 30, 58, 0.3) !important;
    border: none !important;
}

.btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 15px -3px rgba(196, 30, 58, 0.4) !important;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #5a6268 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, var(--secondary-color) 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #5a6268 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #38a169 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #e53e3e 100%);
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    border: none;
    border-radius: 6px;
    font-weight: 500;
}

/* Dashboard Card Enhancements */
.dashboard-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 12px;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.dashboard-card-icon {
    opacity: 0.8;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}

.alert-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #38a169 100%);
    color: white;
    border-left: 4px solid #2f855a;
}

.alert-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #e53e3e 100%);
    color: white;
    border-left: 4px solid #c53030;
}

.alert-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #dd6b20 100%);
    color: white;
    border-left: 4px solid #c05621;
}

.alert-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #3182ce 100%);
    color: white;
    border-left: 4px solid #2c5282;
}

/* Utility Classes */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Utilities */
.cursor-pointer {
    cursor: pointer;
}

.transition-all {
    transition: var(--transition);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--info-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.shadow-sm {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.shadow {
    box-shadow: var(--box-shadow);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.rounded {
    border-radius: var(--border-radius);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--primary-color), var(--info-color)) 1;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

/* Focus States */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Disabled States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.form-control:disabled,
.form-select:disabled {
    background-color: #f8f9fa;
    opacity: 0.8;
}

/* Category Modal Image Preview */
#category-image-preview-container {
    max-height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 10px;
}

#category-image-preview {
    max-width: 150px;
    max-height: 150px;
    object-fit: contain;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Brand Logo Preview Styles */
#marka-logo-preview-container {
    max-width: 200px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    background-color: #f8f9fa;
}

#marka-logo-preview {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Marka table logo styles */
.marka-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

/* Featured Categories Page Styles */
.main-content {
    background: linear-gradient(135deg, #f8f9fc 0%, #e9ecef 100%);
    min-height: 100vh;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.page-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255,255,255,0.15);
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(255,255,255,0.2);
}

.user-info i {
    font-size: 1.5rem;
}

/* Card Improvements */
.card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: white;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fc 0%, #e9ecef 100%);
    border-bottom: 2px solid #e3e6f0;
    padding: 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Category Item Styles */
.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
    border: 2px solid #e3e6f0;
    border-radius: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.category-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s;
}

.category-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.category-item:hover::before {
    left: 100%;
}

.category-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.category-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid #e3e6f0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.category-item:hover .category-image {
    border-color: #667eea;
    transform: scale(1.05);
}

.category-details h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2d3748;
    font-size: 1.1rem;
}

.category-details p {
    margin-bottom: 0.5rem;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.4;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.add-to-featured {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.add-to-featured:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
}

/* Featured Categories List */
.featured-list {
    min-height: 400px;
}

.featured-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 12px;
    cursor: move;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.featured-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.4);
}

.featured-item .category-image {
    border-color: rgba(255,255,255,0.3);
}

.featured-item .category-details h6 {
    color: white;
}

.featured-item .category-details p {
    color: rgba(255,255,255,0.9);
}

.remove-featured {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
}

.remove-featured:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* Alert Improvements */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.alert-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.alert-info i {
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

/* Form Controls */
.form-select, .form-control {
    border: 2px solid #e3e6f0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-select:focus, .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* Button Improvements */
.btn {
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Badge Count */
.badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Empty State */
.text-center.py-4 {
    padding: 3rem 1rem !important;
    background: linear-gradient(135deg, #f8f9fc 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 2px dashed #cbd5e1;
}

.text-center.py-4 i {
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.text-center.py-4 p {
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.text-center.py-4 small {
    color: #94a3b8;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .header {
        padding: 1.5rem;
        text-align: center;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .category-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .category-info {
        flex-direction: column;
        text-align: center;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Ensure add product button is visible on mobile */
    #add-product-btn {
        display: block !important;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .d-flex.justify-content-between {
        flex-direction: column;
        align-items: stretch !important;
    }
}

/* Custom Modal Styles - Force override all Bootstrap modal styles */
.custom-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 99999 !important;
    display: none !important;
    pointer-events: auto !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
}

.custom-modal.show {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.custom-modal-backdrop {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    pointer-events: auto !important;
}

.custom-modal-dialog {
    position: relative !important;
    width: 90% !important;
    max-width: 800px !important;
    z-index: 10 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    -webkit-filter: none !important;
}

.custom-modal-content {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    background-color: #fff !important;
    background-clip: padding-box !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    outline: 0 !important;
    z-index: 100001 !important;
    pointer-events: auto !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    -webkit-filter: none !important;
}

.custom-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.custom-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-color);
}

.custom-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    opacity: 0.5;
    cursor: pointer;
    padding: 0;
    width: 1em;
    height: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-close-btn:hover {
    opacity: 0.75;
}

.custom-modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 10001;
    pointer-events: auto;
}

.custom-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
    border-bottom-right-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
}

/* Prevent body scroll when modal is open */
body.custom-modal-open {
    overflow: hidden !important;
    padding-right: 0 !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

/* Animation */
.custom-modal {
    opacity: 0;
    transition: opacity 0.15s linear;
}

.custom-modal.show {
    opacity: 1;
}

.custom-modal-dialog {
    transform: translateY(-50px);
    transition: transform 0.3s ease-out;
}

.custom-modal.show .custom-modal-dialog {
    transform: translateY(0);
}

/* Ensure custom modal form inputs are clickable */
.custom-modal .form-control,
.custom-modal .form-select,
.custom-modal .form-check-input,
.custom-modal input,
.custom-modal textarea,
.custom-modal select,
.custom-modal button {
    position: relative !important;
    z-index: 100002 !important;
    background-color: #fff !important;
    border: 1px solid #ced4da !important;
    pointer-events: auto !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    -webkit-filter: none !important;
}

.custom-modal .form-control:focus,
.custom-modal .form-select:focus,
.custom-modal input:focus,
.custom-modal textarea:focus,
.custom-modal select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(196, 30, 58, 0.25) !important;
    z-index: 100003 !important;
    pointer-events: auto !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    -webkit-filter: none !important;
}

/* Fix for textarea in custom modal */
.custom-modal textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Ensure buttons are clickable */
.btn, button {
    pointer-events: auto !important;
    z-index: 1 !important;
    position: relative !important;
}

#add-product-btn {
    pointer-events: auto !important;
    z-index: 10 !important;
    position: relative !important;
}

/* Hide Bootstrap modal backdrop completely */
.modal-backdrop {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    z-index: -1 !important;
}

.modal-backdrop.show {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    z-index: -1 !important;
}