/* FishFeed Pro - Complete Optimized Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #20c997 0%, #0d9488 100%);
    min-height: 100vh;
}

/* ===== ANIMATIONS ===== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-3px);
        max-height: 0;
    }

    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 15px;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ===== ORDER CONTAINER - NEW ORDER SPECIFIC ===== */
.order-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 20px;
    height: calc(100vh - 150px);
}

.available-items-panel, .order-summary-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-header {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .panel-header h3 {
        margin: 0;
        font-size: 1.2rem;
        color: #495057;
    }

.search-container {
    position: relative;
    width: 250px;
}

.search-input {
    width: 100%;
    padding: 8px 35px 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background: #ffffff;
    color: #374151;
    transition: all 0.2s ease;
}

    .search-input:focus {
        outline: none;
        border-color: #20c997;
        box-shadow: 0 0 0 1px rgba(32, 201, 151, 0.1);
    }

.search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.inventory-grid {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(100vh - 200px);
}

.inventory-card {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 320px;
    height: auto;
}

    .inventory-card:hover {
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        transform: translateY(-2px);
    }

.card-image-container {
    position: relative;
    height: 120px;
    overflow: hidden;
    background: #f8f9fa;
    flex-shrink: 0;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease;
}

    .card-image:hover {
        transform: scale(1.03);
    }

.out-of-stock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.low-stock-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ffc107;
    color: #212529;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}

.card-content {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
}

.item-name {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    margin: 0 0 12px 0;
    line-height: 1.3;
    min-height: 32px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-shrink: 0;
    gap: 10px;
}

.price {
    font-size: 16px;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 4px;
}

.stock {
    font-size: 12px;
    color: #6c757d;
    text-align: right;
    line-height: 1.2;
}

.card-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 12px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ced4da;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
    max-width: 120px;
    align-self: center;
    height: 40px;
}

.qty-btn {
    background: #f8f9fa;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: background 0.2s;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .qty-btn:hover {
        background: #e9ecef;
    }

    .qty-btn:active {
        background: #dee2e6;
    }

.qty-input {
    border: none;
    width: 60px;
    text-align: center;
    padding: 10px 8px;
    font-size: 15px;
    font-weight: 500;
}

/* Updated add-item-btn with proper specificity */
.inventory-card .add-item-btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #007bff !important;
    color: white !important;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
}

    .inventory-card .add-item-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0,123,255,0.3);
        background-color: #0056b3 !important;
        color: white !important;
        text-decoration: none;
    }

    .inventory-card .add-item-btn:active {
        transform: translateY(0);
    }

    .inventory-card .add-item-btn:disabled {
        background-color: #6c757d !important;
        border-color: #6c757d;
        cursor: not-allowed;
        opacity: 0.65;
        color: white !important;
    }

.order-summary-panel {
    position: sticky;
    top: 20px;
}

.item-count {
    background: #007bff;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 14px;
}

.order-items-container {
    flex: 1;
    overflow-y: auto;
}

.empty-order-message {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-order-message p {
    margin: 5px 0;
}

.empty-subtitle {
    font-size: 14px;
    color: #adb5bd;
}

.order-items-list {
    padding: 20px;
}

.order-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

    .order-item:last-child {
        border-bottom: none;
    }

.order-item-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
    cursor: pointer;
}

.order-item-details {
    flex: 1;
}

.order-item-name {
    font-weight: 600;
    margin: 0 0 5px 0;
    font-size: 14px;
}

.order-item-price {
    color: #28a745;
    font-size: 14px;
    margin: 0;
}

.order-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-item-quantity {
    display: flex;
    align-items: center;
    border: 1px solid #ced4da;
    border-radius: 4px;
    overflow: hidden;
}

.order-qty-btn {
    background: #f8f9fa;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    min-width: 32px;
}

.order-qty-input {
    border: none;
    width: 50px;
    text-align: center;
    padding: 6px;
    font-size: 13px;
}

.remove-item-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 12px;
}

.order-total-section {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.total-label {
    font-size: 18px;
    font-weight: 600;
    color: #495057;
}

.total-amount {
    font-size: 24px;
    font-weight: bold;
    color: #28a745;
}

/* ===== AUTHENTICATION LAYOUTS ===== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 32px;
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.5s ease-out;
}

/* ===== LOGO & BRANDING ===== */
.logo {
    text-align: center;
    margin-bottom: 24px;
}

    .logo h1 {
        color: #1f2937;
        font-size: 24px;
        font-weight: 700;
        margin-bottom: 4px;
    }

    .logo p {
        color: #6b7280;
        font-size: 13px;
    }

/* ===== OPTIMIZED FORM STYLES ===== */
.form-group {
    margin-bottom: 14px;
}

    .form-group label {
        display: block;
        margin-bottom: 5px;
        color: #374151;
        font-weight: 500;
        font-size: 12px;
        letter-spacing: 0.3px;
    }

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #374151;
}

    .form-input:focus {
        outline: none;
        border-color: #20c997;
        box-shadow: 0 0 0 1px rgba(32, 201, 151, 0.1);
    }

    .form-input::placeholder {
        color: #9ca3af;
        font-size: 12px;
    }

/* ===== ERROR & SUCCESS MESSAGES ===== */
.error-message {
    display: none;
}

    .error-message:not(:empty) {
        display: block;
        margin-top: 2px;
        color: #dc2626;
        font-size: 9px;
        font-weight: 400;
        line-height: 1.2;
        padding-left: 2px;
        animation: slideDown 0.2s ease;
    }

.field-validation-error {
    display: block;
    margin-top: 2px;
    color: #dc2626;
    font-size: 9px;
    font-weight: 400;
    line-height: 1.2;
    padding-left: 2px;
    animation: slideDown 0.2s ease;
}

.field-validation-valid {
    display: none;
}

.success-message {
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 11px;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ===== INPUT VALIDATION STATES ===== */
.input-validation-error {
    border-color: #dc2626 !important;
    background-color: #fffbfb !important;
}

    .input-validation-error:focus {
        border-color: #dc2626 !important;
        box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.1) !important;
    }

.valid {
    border-color: #10b981;
    background-color: #feffff;
}

/* ===== BUTTONS - General ===== */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: linear-gradient(135deg, #20c997, #0d9488);
    color: white;
}

    .btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgba(32, 201, 151, 0.25);
        text-decoration: none;
        color: white;
    }

.btn-secondary {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

    .btn-secondary:hover {
        background: #e2e8f0;
        text-decoration: none;
        color: #64748b;
    }

.btn-danger {
    background: #ef4444;
    color: white;
}

    .btn-danger:hover {
        background: #dc2626;
        text-decoration: none;
        color: white;
    }

.btn-success {
    background: #10b981;
    color: white;
}

    .btn-success:hover {
        background: #0d9488;
        text-decoration: none;
        color: white;
    }

.btn-full-width {
    width: 100%;
    margin-bottom: 10px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 4px;
}

.btn-block {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-3 {
    margin-bottom: 12px;
}

.mb-4 {
    margin-bottom: 16px;
}

/* ===== DASHBOARD LAYOUT ===== */
.dashboard-page {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 95%;
    max-width: 1400px;
    min-height: 90vh;
    overflow: hidden;
    margin: 20px auto;
    animation: fadeIn 0.6s ease-out;
}

.dashboard-header {
    background: linear-gradient(135deg, #20c997, #0d9488);
    color: white;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .dashboard-header h1 {
        font-size: 20px;
        font-weight: 700;
    }

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

    .logout-btn:hover {
        background: rgba(255, 255, 255, 0.3);
    }

.dashboard-main {
    display: flex;
    min-height: calc(90vh - 64px);
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 260px;
    background: #f8fafc;
    padding: 24px 0;
    border-right: 1px solid #e2e8f0;
}

.sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .sidebar-nav li {
        margin-bottom: 2px;
    }

    .sidebar-nav a {
        display: flex;
        align-items: center;
        padding: 12px 24px;
        color: #64748b;
        text-decoration: none;
        transition: all 0.2s ease;
        font-size: 13px;
    }

        .sidebar-nav a:hover, .sidebar-nav a.active {
            background: #20c997;
            color: white;
            text-decoration: none;
        }

    .sidebar-nav i {
        margin-right: 10px;
        width: 16px;
    }

/* ===== CONTENT AREA ===== */
.content {
    flex: 1;
    padding: 32px;
}

/* ===== PAGE HEADERS ===== */
.page-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* ===== RESPONSIVE DESIGN - ORDER SPECIFIC ===== */
@media (max-width: 1200px) {
    .inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .order-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        padding: 12px;
        gap: 16px;
    }

    .inventory-card {
        min-height: 360px;
    }

    .search-container {
        width: 200px;
    }

    .item-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 18px;
    }

    .price {
        font-size: 18px;
        margin-bottom: 0;
    }

    .stock {
        font-size: 13px;
        text-align: left;
    }

    .quantity-selector {
        max-width: 140px;
        height: 45px;
    }

    .qty-btn {
        padding: 12px 18px;
        font-size: 18px;
        font-weight: bold;
        min-width: 45px;
    }

    .qty-input {
        width: 70px;
        font-size: 16px;
        padding: 12px 10px;
    }

    .inventory-card .add-item-btn {
        padding: 14px 16px !important;
        font-size: 16px !important;
        min-height: 48px !important;
    }

    .card-actions {
        gap: 15px;
        padding-top: 15px;
    }

    .card-content {
        padding: 15px;
    }

    /* General mobile styles */
    .dashboard-page {
        margin: 10px;
        width: calc(100% - 20px);
        border-radius: 8px;
    }

    .dashboard-header {
        padding: 12px 16px;
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .dashboard-main {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 12px 0;
    }

    .sidebar-nav a {
        padding: 10px 16px;
        font-size: 12px;
    }

    .content {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .inventory-grid {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 16px;
    }

    .inventory-card {
        min-height: 400px;
        margin-bottom: 8px;
    }

    .card-content {
        padding: 16px;
        min-height: 240px;
    }

    .item-name {
        font-size: 15px;
        margin-bottom: 15px;
        min-height: 36px;
    }

    .item-details {
        margin-bottom: 20px;
        gap: 10px;
    }

    .price {
        font-size: 20px;
        font-weight: bold;
    }

    .stock {
        font-size: 14px;
        color: #6c757d;
    }

    .quantity-selector {
        max-width: 160px;
        height: 52px;
        border: 2px solid #ced4da;
    }

    .qty-btn {
        padding: 16px 20px;
        font-size: 20px;
        font-weight: bold;
        min-width: 52px;
    }

    .qty-input {
        width: 80px;
        font-size: 18px;
        padding: 16px 12px;
        font-weight: 600;
    }

    .inventory-card .add-item-btn {
        padding: 18px 20px !important;
        font-size: 17px !important;
        font-weight: 600 !important;
        min-height: 54px !important;
        margin-top: 8px !important;
    }

    .card-actions {
        gap: 20px;
        margin-top: 20px;
        padding-top: 20px;
    }

    /* Order summary mobile improvements */
    .order-qty-btn {
        padding: 10px 14px;
        font-size: 16px;
        font-weight: bold;
        min-width: 40px;
        min-height: 40px;
    }

    .order-qty-input {
        width: 60px;
        font-size: 15px;
        padding: 10px;
    }

    .remove-item-btn {
        padding: 10px 12px;
        font-size: 13px;
        min-height: 40px;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .inventory-card {
        min-height: 420px;
    }

    .card-content {
        padding: 18px;
        min-height: 260px;
    }

    .inventory-card .add-item-btn {
        min-height: 56px !important;
        font-size: 16px !important;
        padding: 20px !important;
    }

    .quantity-selector {
        height: 54px;
    }

    .qty-btn {
        padding: 18px 22px;
        min-width: 54px;
    }
}

/* ===== REMAINING SITE.CSS STYLES (NON-CONFLICTING) ===== */

/* Stats, Tables, Modals, etc. */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease;
}

    .stat-card:hover {
        transform: translateY(-2px);
    }

    .stat-card h3 {
        color: #64748b;
        font-size: 12px;
        font-weight: 500;
        margin-bottom: 8px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .stat-card .value {
        font-size: 28px;
        font-weight: 700;
        color: #1e293b;
        margin-bottom: 8px;
    }

    .stat-card .change {
        font-size: 12px;
        font-weight: 500;
    }

.change.positive {
    color: #0d9488;
}

.change.negative {
    color: #dc2626;
}

/* Tables */
.chart-container, .data-table-container, .table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    overflow: hidden;
}

.chart-container {
    padding: 24px;
}

    .chart-container h2 {
        color: #1e293b;
        margin-bottom: 16px;
        font-size: 18px;
    }

.table-container {
    padding: 15px;
    overflow-x: auto;
}

.data-table-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .data-table-header h2 {
        color: #1e293b;
        font-size: 18px;
        margin: 0;
    }

.data-table, .table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

    .data-table th, .data-table td,
    .table th, .table td {
        padding: 12px 24px;
        text-align: left;
        border-bottom: 1px solid #f1f5f9;
    }

    .data-table th, .table th {
        background: #f8fafc;
        font-weight: 600;
        color: #475569;
        font-size: 12px;
    }

    .data-table td, .table td {
        color: #64748b;
        font-size: 12px;
    }

    .data-table tbody tr:hover,
    .table tr:hover {
        background: #f8fafc;
    }

/* Status badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
}

.status-completed, .status-paid {
    background: #dcfce7;
    color: #166534;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.status-unpaid {
    background: #fee2e2;
    color: #dc2626;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

/* Pagination */
.pagination-container {
    padding: 20px 24px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.pagination-info {
    color: #64748b;
    font-size: 12px;
}

.pagination-controls {
    display: flex;
    gap: 8px;
}

    .pagination-controls .btn {
        padding: 6px 12px;
        font-size: 12px;
    }

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 9999;
}

    .modal-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

.modal-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-10px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    margin-bottom: 16px;
}

    .modal-header h3 {
        color: #1e293b;
        font-size: 18px;
        margin: 0;
    }

.modal-footer, .modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Cart */
.cart-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    padding: 20px;
    margin-bottom: 24px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

    .cart-item:last-child {
        border-bottom: none;
    }

.cart-total {
    font-weight: 600;
    font-size: 16px;
    color: #1e293b;
    padding-top: 12px;
    border-top: 2px solid #e2e8f0;
}

/* Dropdowns */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: none;
    border: 1px solid #ddd;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    color: #666;
    transition: all 0.2s ease;
    min-width: 28px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .dropdown-toggle:hover {
        background: #f8f9fa;
        border-color: #999;
    }

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    min-width: 120px;
    margin-top: 2px;
}

.dropdown.active .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 11px;
    color: #333;
    transition: background-color 0.2s ease;
    text-decoration: none;
}

    .dropdown-item:hover {
        background: #f8f9fa;
    }

    .dropdown-item.delete {
        color: #dc3545;
    }

        .dropdown-item.delete:hover {
            background: #fff5f5;
        }

    .dropdown-item.topup {
        color: #0066cc;
    }

        .dropdown-item.topup:hover {
            background: #f0f9ff;
        }

    .dropdown-item.limit {
        color: #16a34a;
    }

        .dropdown-item.limit:hover {
            background: #f9fdf7;
        }

    .dropdown-item i {
        width: 12px;
        height: 12px;
        flex-shrink: 0;
    }

/* Image viewer system */
.image-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .image-viewer-overlay.active {
        display: flex;
        opacity: 1;
    }

.image-viewer-modal {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.image-viewer-overlay.active .image-viewer-modal {
    transform: scale(1);
}

.image-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.image-viewer-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.image-viewer-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

    .image-viewer-close:hover {
        background: #e9ecef;
        color: #333;
    }

.image-viewer-content {
    padding: 16px;
    text-align: center;
    background: white;
}

.image-viewer-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-viewer-loading {
    display: none;
    padding: 32px;
    text-align: center;
    color: #666;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 1s linear infinite;
    margin: 0 auto 8px;
}

/* File input preview */
.file-preview-container {
    margin-top: 8px;
    display: none;
}

.file-preview-img {
    max-width: 160px;
    max-height: 120px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

    .file-preview-img:hover {
        border-color: #007bff;
    }

/* Image thumbnails */
.existing-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.image-thumbnail, .viewable-image {
    cursor: pointer;
    transition: transform 0.2s ease;
    border-radius: 6px;
    border: 2px solid transparent;
}

.image-thumbnail {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

    .image-thumbnail:hover, .viewable-image:hover {
        transform: scale(1.03);
        border-color: #007bff;
    }

/* Links */
.forgot-password, .back-link {
    text-align: center;
    margin-top: 16px;
}

    .forgot-password a, .back-link a {
        color: #20c997;
        text-decoration: none;
        font-size: 12px;
    }

        .forgot-password a:hover, .back-link a:hover {
            text-decoration: underline;
        }

/* Low stock alert styles */
.low-stock-alert {
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
    border-left: 4px solid #f59e0b;
}

.alert-header {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-title {
    font-weight: 600;
    font-size: 16px;
    color: #92400e;
    display: flex;
    align-items: center;
}

.alert-icon {
    margin-right: 8px;
    font-size: 18px;
    color: #f59e0b;
}

.alert-close-btn {
    background: rgba(146, 64, 14, 0.1);
    border: none;
    color: #92400e;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
    opacity: 0.8;
    transition: all 0.2s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .alert-close-btn:hover {
        opacity: 1;
        background: rgba(146, 64, 14, 0.15);
        transform: translateY(-1px);
    }

.alert-content {
    padding: 20px 20px 16px;
}

.alert-message {
    color: #374151;
    font-size: 14px;
    margin-bottom: 16px;
    font-weight: 500;
}

.low-stock-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.low-stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

    .low-stock-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .low-stock-item:hover {
        background: #f8fafc;
        margin: 0 -12px;
        padding-left: 12px;
        padding-right: 12px;
        border-radius: 6px;
    }

.reorder-info {
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    margin-left: 15px;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 12px;
}

.low-stock-alert.hidden {
    display: none;
}

/* Raw Materials Section */
.raw-materials-section {
    padding: 24px;
    border-bottom: 1px solid #f1f5f9;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.add-raw-material-btn {
    background: linear-gradient(135deg, #20c997, #0d9488);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .add-raw-material-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgba(32, 201, 151, 0.25);
    }

.raw-materials-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

    .raw-materials-table th {
        background: #f8fafc;
        padding: 12px;
        text-align: left;
        font-weight: 600;
        color: #475569;
        border-bottom: 2px solid #e2e8f0;
    }

    .raw-materials-table td {
        padding: 12px;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: middle;
    }

    .raw-materials-table tr:hover {
        background: #f8fafc;
    }

.material-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    background: white;
}

    .material-select:focus {
        outline: none;
        border-color: #20c997;
        box-shadow: 0 0 0 1px rgba(32, 201, 151, 0.1);
    }

.quantity-input {
    width: 100%;
    max-width: 120px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
}

    .quantity-input:focus {
        outline: none;
        border-color: #20c997;
        box-shadow: 0 0 0 1px rgba(32, 201, 151, 0.1);
    }

.remove-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

    .remove-btn:hover {
        background: #dc2626;
        transform: translateY(-1px);
    }

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.empty-state-icon {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 12px;
}

/* Finished Product Section */
.finished-product-section {
    padding: 24px;
    border-bottom: 1px solid #f1f5f9;
}

.product-selection-row {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 20px;
    align-items: end;
}

/* Narration Section */
.narration-section {
    padding: 24px;
}

.narration-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s ease;
}

    .narration-textarea:focus {
        outline: none;
        border-color: #20c997;
        box-shadow: 0 0 0 1px rgba(32, 201, 151, 0.1);
    }

    .narration-textarea::placeholder {
        color: #9ca3af;
    }

/* Form Actions */
.form-actions {
    padding: 24px;
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Nuclear option - force horizontal scroll */
.content table {
    min-width: 900px !important;
}

.content, .dashboard-page .content {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Alternative - target any div containing a table */
div:has(table) {
    overflow-x: auto !important;
}