/* Modern Pharmacy POS System - Inspired by Hichiem.com */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors - Blue Theme like Hichiem */
    --primary-blue: #0070F4;
    --primary-blue-light: #E5F1FE;
    --primary-blue-dark: #0056D2;

    /* Status Colors */
    --success-green: #10B981;
    --success-green-light: #D1FAE5;
    --warning-orange: #F59E0B;
    --warning-orange-light: #FEF3C7;
    --danger-red: #EF4444;
    --danger-red-light: #FEE2E2;
    --purple: #8B5CF6;
    --purple-light: #EDE9FE;

    /* Neutral Colors */
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Borders */
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

body {
    font-family: var(--font-family);
    background: var(--gray-50);
    color: var(--gray-900);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    opacity: 1 !important;
    visibility: visible !important;
}

.header * {
    opacity: 1 !important;
    visibility: visible !important;
}

.header-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.sidebar-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
    color: var(--gray-700);
    border-radius: var(--border-radius-md);
    transition: background 0.2s;
}

.sidebar-toggle:hover {
    background: var(--gray-100);
}

@media (max-width: 1024px) {
    .sidebar-toggle {
        display: block;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-weight: 700;
    font-size: 18px;
    color: #111827 !important;
    text-decoration: none;
    opacity: 1 !important;
    visibility: visible !important;
}

.logo svg {
    flex-shrink: 0;
    opacity: 1 !important;
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 64px;
    width: 260px;
    height: calc(100vh - 64px);
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--spacing-lg);
    z-index: 999;
    transition: transform 0.3s ease;
}

.sidebar.hidden {
    transform: translateX(-100%);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.nav-link {
    display: flex !important;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) !important;
    border-radius: var(--border-radius-md);
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #374151 !important;
    text-decoration: none !important;
    position: relative;
    opacity: 1 !important;
    visibility: visible !important;
    transition: background 0.2s, color 0.2s !important;
    text-shadow: none !important;
    -webkit-text-fill-color: #374151 !important;
    -webkit-opacity: 1 !important;
}

.nav-link svg {
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

/* Force all text and content to be visible */
.nav-link *,
.nav-link::before,
.nav-link::after {
    opacity: 1 !important;
    visibility: visible !important;
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--primary-blue) !important;
}

.nav-link:hover svg {
    opacity: 1;
}

.nav-link.active {
    background: var(--primary-blue-light);
    color: var(--primary-blue) !important;
}

.nav-link.active svg {
    opacity: 1;
}

.sidebar-divider {
    height: 1px;
    background: var(--gray-200);
    margin: var(--spacing-lg) 0;
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.search-box {
    position: relative;
    width: 320px;
}

.search-icon {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF !important;
    pointer-events: none;
    opacity: 1 !important;
}

.search-box input {
    width: 100%;
    padding: 0.625rem var(--spacing-md) 0.625rem 2.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-lg);
    font-size: 14px;
    transition: all 0.2s;
    color: #111827 !important;
    opacity: 1 !important;
}

.search-box input::placeholder {
    color: #9CA3AF !important;
    opacity: 1 !important;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px var(--primary-blue-light);
}

.notification-btn {
    position: relative;
    padding: var(--spacing-sm);
    border: none;
    background: transparent;
    color: #4B5563 !important;
    cursor: pointer;
    border-radius: var(--border-radius-md);
    transition: all 0.2s;
    opacity: 1 !important;
}

.notification-btn svg {
    opacity: 1 !important;
}

.notification-btn:hover {
    background: var(--gray-100);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--danger-red);
    color: var(--white);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    opacity: 1 !important;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: all 0.2s;
}

.user-menu:hover {
    background: var(--gray-100);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    opacity: 1 !important;
}

.user-menu span {
    font-size: 14px;
    font-weight: 500;
    color: #374151 !important;
    opacity: 1 !important;
}

.user-menu button {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Main Container */
.main-container {
    margin-left: 260px;
    padding: var(--spacing-2xl);
    min-height: calc(100vh - 64px);
    transition: margin-left 0.3s ease;
}

@media (max-width: 1024px) {
    .main-container {
        margin-left: 0;
    }
}

/* Content Sections */
.content-section {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-xl);
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 0.625rem var(--spacing-lg);
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-small {
    padding: 0.4rem 0.75rem;
    font-size: 13px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    display: flex;
    gap: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card.blue .stat-icon {
    background: var(--primary-blue-light);
    color: var(--primary-blue);
}

.stat-card.green .stat-icon {
    background: var(--success-green-light);
    color: var(--success-green);
}

.stat-card.purple .stat-icon {
    background: var(--purple-light);
    color: var(--purple);
}

.stat-card.orange .stat-icon {
    background: var(--warning-orange-light);
    color: var(--warning-orange);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: var(--spacing-xs);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--spacing-xs);
}

.stat-change {
    font-size: 13px;
    font-weight: 500;
}

.stat-change.positive {
    color: var(--success-green);
}

.stat-change.negative {
    color: var(--danger-red);
}

.stat-change.neutral {
    color: var(--gray-500);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
}

.card-link {
    font-size: 14px;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}

.card-link:hover {
    text-decoration: underline;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: var(--spacing-lg);
}

/* Filters Bar */
.filters-bar {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.search-input,
.filter-select,
.date-input {
    padding: 0.625rem var(--spacing-md);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-md);
    font-size: 14px;
    transition: all 0.2s;
}

.search-input {
    flex: 1;
    min-width: 250px;
}

.search-input:focus,
.filter-select:focus,
.date-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px var(--primary-blue-light);
}

.filter-select {
    min-width: 180px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--spacing-lg);
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary-blue);
}

.product-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-md);
    background: var(--gray-100);
}

/* Related products: enforce 3:4 aspect ratio on cards inside product page related grid */
#relatedProductsGrid .product-image {
    aspect-ratio: 3 / 4;
    height: auto;
    overflow: hidden;
}
#relatedProductsGrid .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--border-radius-md);
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--spacing-xs);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: var(--spacing-xs);
}

.product-stock {
    font-size: 13px;
    color: var(--gray-500);
}

.product-category {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    background: var(--gray-100);
    color: var(--gray-700);
    margin-top: var(--spacing-sm);
}

/* Product Delete Button */
.product-delete-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: #DC2626;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.product-card:hover .product-delete-btn {
    opacity: 1;
}

.product-delete-btn:hover {
    background: #FEE2E2;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.product-delete-btn:active {
    transform: scale(0.95);
}

/* View Toggle Buttons */
.btn-view {
    padding: 8px 12px;
    border: 2px solid var(--gray-300);
    background: var(--white);
    color: var(--gray-600);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-view:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: #EFF6FF;
}

.btn-view.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
}

/* Products Table View */
.products-table-container {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.products-table {
    width: 100%;
    border-collapse: collapse;
}

.products-table thead {
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
}

.products-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.products-table tbody tr {
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.2s ease;
}

.products-table tbody tr:hover {
    background: var(--gray-50);
}

.products-table td {
    padding: 16px;
    font-size: 14px;
    color: var(--gray-900);
    vertical-align: middle;
}

.product-image-small {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    background: var(--gray-100);
    color: var(--gray-700);
}

.badge-stock {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    background: #DCFCE7;
    color: #166534;
}

.badge-stock.low-stock {
    background: #FEE2E2;
    color: #991B1B;
}

.btn-icon-danger {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #DC2626;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-icon-danger:hover {
    background: #FEE2E2;
    transform: scale(1.1);
}

.btn-icon-danger:active {
    transform: scale(0.95);
}

.btn-icon-primary {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: #0070F4;
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-icon-primary:hover {
    background: #0060D5;
    transform: scale(1.1);
}

.btn-icon-primary:active {
    transform: scale(0.95);
}

/* Suppliers Grid */
.suppliers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-lg);
}

.supplier-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.supplier-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary-blue);
}

.supplier-header {
    display: flex;
    align-items: start;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.supplier-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-lg);
    background: var(--primary-blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-blue);
}

.supplier-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--spacing-xs);
}

.supplier-id {
    font-size: 13px;
    color: var(--gray-500);
}

.supplier-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.supplier-detail {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 14px;
    color: var(--gray-600);
}

.supplier-detail svg {
    color: var(--gray-400);
    flex-shrink: 0;
}

/* Table */
.table-container {
    overflow-x: auto;
    padding: var(--spacing-xl);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--gray-50);
}

th {
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--gray-200);
    font-size: 14px;
    color: var(--gray-700);
}

tr:hover {
    background: var(--gray-50);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: var(--success-green-light);
    color: var(--success-green);
}

.badge-warning {
    background: var(--warning-orange-light);
    color: var(--warning-orange);
}

.badge-danger {
    background: var(--danger-red-light);
    color: var(--danger-red);
}

.badge-info {
    background: var(--primary-blue-light);
    color: var(--primary-blue);
}

/* Action Buttons */
.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: var(--spacing-xs);
}

.btn-view {
    background: var(--primary-blue-light);
    color: var(--primary-blue);
}

.btn-edit {
    background: var(--warning-orange-light);
    color: var(--warning-orange);
}

.btn-delete {
    background: var(--danger-red-light);
    color: var(--danger-red);
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--gray-500);
}

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 var(--spacing-lg);
    }

    .nav-menu {
        display: none;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: var(--spacing-lg);
    }

    .search-box {
        width: 200px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .suppliers-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   MODAL STYLES
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    z-index: 999;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: block;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow-y: auto;
    padding: var(--spacing-xl);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

.modal-content.modal-large {
    max-width: 900px;
}

.modal-header {
    padding: var(--spacing-xl);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-inline-actions {
    display: none;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

#product-modal.inline-mode .product-inline-actions {
    display: flex;
}

#product-modal.inline-mode .modal-footer {
    display: none;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    font-size: 1.5rem;
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

/* Expand Modal Button */
.expand-modal-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.expand-modal-btn:hover {
    background: var(--gray-200);
    color: var(--primary-blue);
}

.expand-modal-btn .material-symbols-outlined {
    font-size: 20px;
}

/* Expanded Modal State */
.modal-content.expanded {
    max-width: 66vw !important;
    width: 66vw !important;
    height: 90vh !important;
    max-height: 90vh !important;
    margin: 5vh auto !important;
}

.modal-content.expanded .modal-body {
    max-height: calc(95vh - 140px) !important;
}

.modal-content.expanded .wysiwyg-editor {
    min-height: 400px !important;
    max-height: 600px !important;
}

/* Inline panel mode for add product */
#product-modal.inline-mode {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    display: block;
    z-index: auto;
    overflow-y: visible;
    padding: 0;
}

#product-modal.inline-mode .modal-content {
    max-width: 100%;
    max-height: none;
    border-radius: var(--border-radius-lg);
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease;
    margin-bottom: 1rem;
}

/* Inline edit wrapper for grid view - span full row */
#product-edit-inline-wrapper {
    grid-column: 1 / -1;
    width: 100%;
}

#product-modal.inline-mode .modal-body {
    max-height: none;
    overflow-y: visible;
}

#product-modal.inline-mode .modal-content.expanded {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
}

/* Inline panel mode for import */
#import-modal.inline-mode {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    display: block;
    z-index: auto;
    overflow-y: visible;
    padding: 0;
}

#import-modal.inline-mode .modal-content {
    max-width: 100%;
    max-height: none;
    border-radius: var(--border-radius-lg);
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease;
    margin-bottom: 1rem;
}

#import-modal.inline-mode .modal-body {
    max-height: none;
    overflow-y: visible;
}

/* Inline panel mode for import detail view/edit */
#import-detail-section.inline-mode {
    display: block !important;
    animation: slideDown 0.3s ease;
    border: 1px solid #E5E7EB;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: var(--white);
}

/* Inline panel mode for purchase order */
#purchase-order-modal.inline-mode {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    display: block;
    z-index: auto;
    overflow-y: visible;
    padding: 0;
}

#purchase-order-modal.inline-mode .modal-content {
    max-width: 100%;
    max-height: none;
    border-radius: var(--border-radius-lg);
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease;
    margin-bottom: 1rem;
}

#purchase-order-modal.inline-mode .modal-body {
    max-height: none;
    overflow-y: visible;
}

/* Inline panel mode for purchase order detail view/edit */
#purchase-order-detail-section.inline-mode {
    display: block !important;
    animation: slideDown 0.3s ease;
    border: 1px solid #E5E7EB;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: var(--white);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-body {
    padding: var(--spacing-xl);
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: var(--spacing-xl);
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
}

/* Form Sections */
.form-section {
    margin-bottom: var(--spacing-xl);
}

.form-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--primary-blue);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

.form-grid .form-group.full-width {
    grid-column: 1 / -1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    font-family: var(--font-family);
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px var(--primary-blue-light);
}

.form-group input:disabled,
.form-group select:disabled {
    background: var(--gray-100);
    color: var(--gray-500);
    cursor: not-allowed;
}

.form-group input[readonly] {
    background: var(--gray-50);
    color: var(--gray-600);
}

/* Prevent product media file inputs from overflowing their flex/grid containers */
#product-photo-file,
#product-photo-file-2,
#product-photo-file-3,
#product-photo-file-4,
#product-photos-multiple,
#product-video-file {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

#product-photo-file::file-selector-button,
#product-photo-file-2::file-selector-button,
#product-photo-file-3::file-selector-button,
#product-photo-file-4::file-selector-button,
#product-photos-multiple::file-selector-button,
#product-video-file::file-selector-button {
    max-width: 100%;
}

/* Import Items Table */
.import-items-container {
    background: var(--gray-50);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-lg);
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--spacing-lg);
    background: var(--white);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.items-table thead {
    background: var(--gray-100);
}

.items-table th {
    padding: 0.75rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
}

.items-table td {
    padding: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.items-table tbody tr:last-child td {
    border-bottom: none;
}

.items-table input,
.items-table select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    font-family: var(--font-family);
}

.items-table input:focus,
.items-table select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px var(--primary-blue-light);
}

/* ========================================
   Print Report Styles
   ======================================== */
@media print {
    /* Force hide header and sidebar when printing */
    .header,
    .header *,
    .sidebar,
    .sidebar * {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

    body * {
        visibility: hidden;
    }

    /* Show print report modal */
    #print-report-modal,
    #print-report-modal * {
        visibility: visible;
    }

    /* Show barcode labels when printing */
    #barcode-labels-container,
    #barcode-labels-container * {
        visibility: visible !important;
    }

    #print-report-modal {
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background: white;
    }

    #print-report-modal .modal-content {
        max-width: 100%;
        margin: 0;
        padding: 0;
        box-shadow: none;
        border: none;
    }

    #print-report-modal .modal-header,
    #print-report-modal .modal-footer {
        display: none !important;
    }

    #print-report-content {
        padding: 1cm !important;
    }

    .report-page-break {
        page-break-after: always;
    }

    /* Ensure product images print properly */
    .report-table img {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        max-width: 50px;
        max-height: 50px;
    }
}

.report-container {
    font-family: 'Sarabun', Arial, sans-serif;
    line-height: 1.6;
}

.report-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-800);
}

.report-header h1 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.report-header p {
    font-size: 14px;
    color: var(--gray-600);
    margin: 0.25rem 0;
}

.report-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 14px;
}

.report-info-section {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius-md);
}

.report-info-section h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.report-info-section p {
    margin: 0.25rem 0;
    color: var(--gray-700);
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 13px;
}

.report-table thead {
    background: var(--gray-800);
    color: white;
}

.report-table th,
.report-table td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid var(--gray-300);
}

.report-table th {
    font-weight: 600;
    font-size: 13px;
}

.report-table tbody tr:nth-child(even) {
    background: var(--gray-50);
}

.report-table .text-center {
    text-align: center;
}

.report-table .text-right {
    text-align: right;
}

.report-summary {
    margin-left: auto;
    width: 350px;
    margin-bottom: 2rem;
}

.report-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    font-size: 14px;
}

.report-summary-row.total {
    background: var(--gray-800);
    color: white;
    font-weight: bold;
    font-size: 16px;
    margin-top: 0.5rem;
}

.report-signature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.report-signature-box {
    text-align: center;
}

.report-signature-line {
    margin-top: 3rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--gray-800);
}

.report-signature-label {
    font-size: 13px;
    color: var(--gray-700);
}

.items-table input:disabled {
    background: var(--gray-100);
    color: var(--gray-500);
    cursor: not-allowed;
}

.items-table .subtotal-display {
    font-weight: 600;
    color: var(--gray-900);
}

.btn-remove-item {
    background: transparent;
    border: none;
    color: var(--danger-red);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s;
}

.btn-remove-item:hover {
    background: var(--danger-red-light);
}

.btn-add-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    width: auto;
}

/* Import Summary */
.import-summary {
    background: var(--primary-blue-light);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-lg);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    font-size: 0.9375rem;
}

.summary-row.total {
    border-top: 2px solid var(--primary-blue);
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-md);
    font-size: 1.125rem;
}

.summary-row strong {
    color: var(--primary-blue);
    font-weight: 600;
}

.summary-row.total strong {
    font-size: 1.5rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Attribute Manager Result Messages */
.result {
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 500;
}

.result.success {
    background: #D1FAE5;
    border: 1px solid #34D399;
    color: #065F46;
}

.result.error {
    background: #FEE2E2;
    border: 1px solid #F87171;
    color: #991B1B;
}

/* Table Action Buttons */
.btn-view {
    background: var(--primary-blue-light);
    border: none;
    color: var(--primary-blue);
    cursor: pointer;
    padding: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s;
}

.btn-view:hover {
    background: var(--primary-blue);
    color: var(--white);
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal {
        padding: var(--spacing-md);
    }

    .modal-content.modal-large {
        max-width: 100%;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .items-table {
        font-size: 0.8125rem;
    }

    .items-table th,
    .items-table td {
        padding: 0.5rem;
    }
}

/* Purchase Order Stock Indicators */
.stock-ok {
    color: var(--success-green);
    background-color: var(--success-green-light);
    font-weight: 600;
    text-align: center;
}

.stock-warning {
    color: var(--danger-red);
    background-color: var(--danger-red-light);
    font-weight: 600;
    text-align: center;
    animation: pulse 2s infinite;
}

/* Remaining After Order Column */
.remaining-after-order {
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.remaining-after-order:not(.stock-warning):not(.stock-ok) {
    color: var(--gray-700);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}


/* ===== WYSIWYG Editor Styles ===== */

/* Toolbar Button */
.toolbar-btn {
    background: white;
    border: 1px solid #DFE3E8;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 500;
    color: #212B36;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar-btn:hover {
    background: #F4F6F8;
    border-color: #0070F4;
    color: #0070F4;
}

.toolbar-btn:active {
    background: #DFE3E8;
    transform: translateY(1px);
}

.toolbar-btn strong,
.toolbar-btn em,
.toolbar-btn u {
    pointer-events: none;
}

/* Toolbar Select Dropdown */
.toolbar-select {
    background: white;
    border: 1px solid #DFE3E8;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 500;
    color: #212B36;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}

.toolbar-select:hover {
    border-color: #0070F4;
    background: #F4F6F8;
}

.toolbar-select:focus {
    border-color: #0070F4;
    box-shadow: 0 0 0 3px rgba(0, 112, 244, 0.1);
}

/* WYSIWYG Toolbar */
.wysiwyg-toolbar {
    user-select: none;
}

/* WYSIWYG Editor ContentEditable */
.wysiwyg-editor {
    outline: none;
}

.wysiwyg-editor:focus {
    border-color: #0070F4 !important;
    box-shadow: 0 0 0 3px rgba(0, 112, 244, 0.1);
}

/* WYSIWYG Editor - Format text inside */
.wysiwyg-editor h2 {
    font-size: 1.8em;
    font-weight: 700;
    margin: 16px 0 12px 0;
    color: #1F2937;
}

.wysiwyg-editor h3 {
    font-size: 1.5em;
    font-weight: 600;
    margin: 14px 0 10px 0;
    color: #1F2937;
}

.wysiwyg-editor h4 {
    font-size: 1.25em;
    font-weight: 600;
    margin: 12px 0 8px 0;
    color: #374151;
}

.wysiwyg-editor p {
    margin: 8px 0;
    line-height: 1.6;
}

.wysiwyg-editor ul,
.wysiwyg-editor ol {
    margin: 12px 0;
    padding-left: 28px;
}

.wysiwyg-editor li {
    margin: 4px 0;
    line-height: 1.6;
}

.wysiwyg-editor blockquote {
    border-left: 4px solid #0070F4;
    background: #F9FAFB;
    padding: 12px 16px;
    margin: 12px 0;
    font-style: italic;
    color: #4B5563;
}

.wysiwyg-editor a {
    color: #0070F4;
    text-decoration: underline;
}

.wysiwyg-editor a:hover {
    color: #0056D2;
}

.wysiwyg-editor strong {
    font-weight: 700;
}

.wysiwyg-editor em {
    font-style: italic;
}

.wysiwyg-editor u {
    text-decoration: underline;
}

/* Hidden Textarea */
#blogContentEditor {
    resize: vertical;
    min-height: 300px;
}

#blogContentEditor:focus {
    outline: none;
    border-color: #0070F4;
    box-shadow: 0 0 0 3px rgba(0, 112, 244, 0.1);
}



/* Expandable Import Detail Rows */
.import-main-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.import-main-row:hover {
    background-color: var(--gray-50);
}

.import-main-row .expand-icon {
    font-size: 0.75rem;
    color: var(--gray-400);
    transition: transform 0.2s ease;
}

.import-detail-row td {
    padding: 0 !important;
    background: var(--gray-50);
}

.import-detail-content {
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.import-detail-content table {
    border-collapse: collapse;
    width: 100%;
}

.import-detail-content table th,
.import-detail-content table td {
    border-bottom: 1px solid var(--gray-200);
}

.highlight-match {
    background: var(--warning-orange-light) !important;
    border-left: 3px solid var(--warning-orange);
}

/* Expandable Purchase Order Detail Rows */
.po-main-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.po-main-row:hover {
    background-color: var(--gray-50);
}

.po-main-row .expand-icon {
    font-size: 0.75rem;
    color: var(--gray-400);
    transition: transform 0.2s ease;
}

.po-detail-row td {
    padding: 0 !important;
    background: var(--gray-50);
}

.po-detail-content {
    animation: slideDown 0.2s ease;
}

.po-detail-content table {
    border-collapse: collapse;
    width: 100%;
}

.po-detail-content table th,
.po-detail-content table td {
    border-bottom: 1px solid var(--gray-200);
}

/* Expandable Customer Order Detail Rows */
.customer-order-main-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.customer-order-main-row:hover {
    background-color: var(--gray-50);
}

.customer-order-main-row .expand-icon {
    font-size: 0.75rem;
    color: var(--gray-400);
    transition: transform 0.2s ease;
}

.customer-order-detail-row td {
    padding: 0 !important;
    background: var(--gray-50);
}

.customer-order-detail-content {
    animation: slideDown 0.2s ease;
}

.customer-order-detail-content table {
    border-collapse: collapse;
    width: 100%;
}

.customer-order-detail-content table th,
.customer-order-detail-content table td {
    border-bottom: 1px solid var(--gray-200);
}

/* ==================== */
/* Image Crop Modal     */
/* ==================== */

.crop-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crop-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.crop-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.crop-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.crop-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.crop-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.crop-close-btn:hover {
    color: var(--gray-900);
}

.crop-aspect-buttons {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    background: var(--gray-50);
}

.crop-ratio-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    background: white;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s;
}

.crop-ratio-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.crop-ratio-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.crop-container {
    position: relative;
    flex: 1;
    min-height: 400px;
    max-height: 70vh;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#crop-image {
    /* Position and size set by JavaScript for precise control */
    position: absolute;
    user-select: none;
    -webkit-user-drag: none;
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.crop-area {
    position: absolute;
    border: 3px solid white;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
    cursor: move;
    pointer-events: auto;
    box-sizing: border-box;
}

.crop-handle {
    position: absolute;
    width: 28px;
    height: 28px;
    background: white;
    border: 3px solid var(--primary);
    border-radius: 50%;
    pointer-events: auto;
    z-index: 100;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.crop-handle:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.crop-handle-nw {
    top: -14px;
    left: -14px;
    cursor: nw-resize;
}

.crop-handle-ne {
    top: -14px;
    right: -14px;
    cursor: ne-resize;
}

.crop-handle-sw {
    bottom: -14px;
    left: -14px;
    cursor: sw-resize;
}

.crop-handle-se {
    bottom: -14px;
    right: -14px;
    cursor: se-resize;
}

.crop-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* Mobile responsiveness for crop modal */
@media (max-width: 640px) {
    .crop-modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }

    .crop-modal-header {
        padding: 0.75rem 1rem;
    }

    .crop-aspect-buttons {
        padding: 0.5rem 1rem;
    }

    .crop-modal-footer {
        padding: 0.75rem 1rem;
    }
}

/* Emoji Buttons */
.emoji-btn {
    padding: 0.5rem;
    background: #F3F4F6;
    border: 1px solid #D1D5DB;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.emoji-btn:hover {
    background: #E5E7EB;
    border-color: #9CA3AF;
}

/* Hero Slider Styles */
.hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f8f9fa;
}

.hero-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Single Column Layout */
.hero-layout-single {
    position: relative;
    width: 100%;
}

.hero-layout-single .swiper {
    width: 100%;
    height: 400px;
}

.hero-slide-content {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-slide-content:hover {
    transform: scale(1.02);
}

.hero-slide-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.hero-text-content {
    max-width: 600px;
    color: white;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
    transition: all 0.3s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 0.2s forwards;
    transition: all 0.3s ease;
}

.hero-cta {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: #0070F4;
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 0.4s forwards;
}

.hero-cta:hover {
    background: #0056D2;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 112, 244, 0.3);
}

/* Two Column Layout */
.hero-layout-two-column {
    display: none;
}

.two-column-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
}

.column-left .swiper,
.column-right .swiper {
    width: 100%;
    height: 400px;
}

.two-column-container .hero-slide-content {
    height: 400px;
}

.two-column-container .hero-overlay {
    padding: 1.5rem;
}

.two-column-container .hero-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.two-column-container .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.two-column-container .hero-cta {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

/* Swiper Navigation */
.hero-nav-btn {
    color: white !important;
    background: rgba(0, 0, 0, 0.5) !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
}

.hero-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8) !important;
    transform: scale(1.1);
}

.hero-nav-btn::after {
    font-size: 16px !important;
}

.hero-pagination {
    bottom: 20px !important;
}

.hero-pagination .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.7) !important;
    opacity: 1 !important;
}

.hero-pagination .swiper-pagination-bullet-active {
    background: white !important;
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-up-delay {
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

.animate-fade-in-up-delay-2 {
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

/* Active Slide Indicator */
.hero-slide-content.active-slide {
    box-shadow: 0 0 0 3px #10B981;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-cta {
        padding: 0.6rem 1.5rem;
    }

    .two-column-container {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .hero-layout-two-column {
        display: block;
    }

    .two-column-container .hero-title {
        font-size: 1.5rem;
    }

    .two-column-container .hero-subtitle {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-cta {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
    }

    .hero-overlay {
        padding: 1rem;
    }
}

/* Google Sheets Import - Column Mapping */
.gsheet-mapping-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-size: 0.85rem;
    background: white;
    cursor: pointer;
}

.gsheet-mapping-select:focus {
    border-color: var(--primary-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 112, 244, 0.1);
}

.gsheet-mapping-select option[value=""] {
    color: #9CA3AF;
}

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