/**
 * Tripple C Foods Inventory - Main Styles
 *
 * Color Scheme (from brand logo):
 * - Primary Magenta: #C2185B
 * - Accent Yellow: #F9A825
 * - Accent Green: #111111
 * - Background: #ffffff
 *
 * Performance Optimized - Google Fonts loaded via PHP with preconnect
 */

/* Subtle Sparkle Animation */
@keyframes subtle-sparkle {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes gentle-pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(194, 24, 91, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(194, 24, 91, 0.5), 0 0 30px rgba(233, 30, 99, 0.2);
    }
}

@keyframes text-shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

:root {
    --tcf-primary: #C2185B !important;
    --tcf-primary-light: #E91E63 !important;
    --tcf-secondary: #C2185B !important;
    --tcf-secondary-light: #E91E63 !important;
    --tcf-accent: #C2185B !important;
    --tcf-accent-light: #E91E63 !important;
    --tcf-accent-dark: #880E4F !important;
    --tcf-brand-yellow: #F9A825 !important;
    --tcf-brand-green: #111111 !important;
    --tcf-success: #111111 !important;
    --tcf-success-light: #333333 !important;
    --tcf-warning: #F9A825 !important;
    --tcf-danger: #dc2626 !important;
    --tcf-danger-light: #ef4444 !important;
    --tcf-white: #ffffff !important;
    --tcf-light: #f1f5f9 !important;
    --tcf-lighter: #f8fafc !important;
    --tcf-gray: #64748b !important;
    --tcf-gray-light: #94a3b8 !important;
    --tcf-dark: #0f172a !important;
    --tcf-border: #e2e8f0 !important;
    --tcf-border-dark: #cbd5e1 !important;
    --tcf-shadow: rgba(74, 13, 42, 0.12) !important;
    --tcf-shadow-lg: rgba(74, 13, 42, 0.2) !important;
    --tcf-glass-bg: rgba(255, 255, 255, 0.85) !important;
    --tcf-glass-border: rgba(173, 20, 87, 0.25) !important;
    --tcf-glass-shadow: 0 8px 32px rgba(74, 13, 42, 0.15), 0 0 0 1px rgba(173, 20, 87, 0.08) !important;
    --tcf-radius: 16px !important;
    --tcf-radius-sm: 8px !important;
    --tcf-radius-lg: 24px !important;
    --tcf-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    --tcf-gradient-primary: #111111 !important;
    --tcf-gradient-accent: #111111 !important;
    --tcf-gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(241,245,249,0.9) 100%) !important;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* True responsive layout — fills device width, no fake desktop scale */
html {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

body {
    font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
    background: var(--tcf-white);
    color: var(--tcf-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    transform: none !important;
    overflow-x: hidden !important;
}

/* Global Font Awesome Fix - Force icons to display */
.fas, .fa, .far, .fab,
.tcf-main .fas, .tcf-main .fa,
.tcf-header .fas, .tcf-footer .fas,
body .fas, body .fa, body .far, body .fab,
[class*="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", FontAwesome !important;
    font-weight: 900 !important;
    font-style: normal !important;
    display: inline-block !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: auto !important;
}

/* GLOBAL DARK HEADER STYLES - Ensures all text visible on dark backgrounds */
.tcf-page-header,
.tcf-form-header,
[class*="header"][style*="background"],
.tcf-order-header,
.tcf-debtor-header {
    color: white !important;
}

.tcf-page-header h1,
.tcf-page-header h2,
.tcf-page-header h3,
.tcf-page-header h4,
.tcf-page-header p,
.tcf-page-header span,
.tcf-page-header a,
.tcf-page-header i,
.tcf-form-header h1,
.tcf-form-header h2,
.tcf-form-header h3,
.tcf-form-header p,
.tcf-form-header span,
.tcf-form-header a,
.tcf-form-header i {
    color: #ffffff !important;
    font-size: 0.75rem !important;
}

.tcf-page-header h1,
.tcf-form-header h1 {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

/* Sleek button styles for headers */
.tcf-btn-history {
    background: #ffffff !important;
    color: #C2185B !important;
    border: 2px solid #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.65rem !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3) !important;
    padding: 0.4rem 0.6rem !important;
}

.tcf-btn-history i {
    color: #C2185B !important;
    font-size: 0.65rem !important;
}

.tcf-btn-history:hover {
    background: #f0f4f8 !important;
    transform: translateY(-2px) !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6,
body h1, body h2, body h3, body h4, body h5, body h6,
.tcf-main h1, .tcf-main h2, .tcf-main h3 {
    color: #C2185B !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin-bottom: 0.5em !important;
}

/* Subtle shimmer effect for page titles */
.tcf-page-title h1,
.tcf-main .tcf-page-title h1 {
    background: linear-gradient(
        90deg, 
        #C2185B 0%, 
        #C2185B 40%, 
        #2a2a2a 50%, 
        #C2185B 60%, 
        #C2185B 100%
    ) !important;
    background-size: 200% auto !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    animation: text-shimmer 4s linear infinite !important;
}

h1 { font-size: 2rem !important; }
h2 { font-size: 1.75rem !important; }
h3 { font-size: 1.5rem !important; }
h4 { font-size: 1.25rem !important; }
h5 { font-size: 1.1rem !important; }
h6 { font-size: 1rem !important; }

p { margin-bottom: 1rem; }

a {
    color: var(--tcf-accent);
    text-decoration: none;
    transition: var(--tcf-transition);
}

a:hover {
    color: var(--tcf-primary);
}

/* Glassmorphism Card - More visible without hover */
.tcf-glass,
body .tcf-glass {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-radius: 16px !important;
    border: 2px solid rgba(173, 20, 87, 0.2) !important;
    box-shadow: 
        0 8px 32px rgba(74, 13, 42, 0.18),
        0 4px 16px rgba(173, 20, 87, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    padding: 1.5rem !important;
    transition: all 0.3s ease !important;
}

.tcf-glass:hover {
    box-shadow: 
        0 16px 48px rgba(74, 13, 42, 0.22),
        0 8px 24px rgba(173, 20, 87, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    transform: translateY(-3px);
    border-color: rgba(37, 99, 235, 0.3) !important;
}

/* Buttons - With high specificity to override theme styles */
.tcf-btn,
body .tcf-btn,
.tcf-main .tcf-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    line-height: 1.5 !important;
    position: relative !important;
    overflow: hidden !important;
}

.tcf-btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

.tcf-btn-primary,
body .tcf-btn-primary,
.tcf-main .tcf-btn-primary,
.tcf-card .tcf-btn-primary {
    background: #111111 !important;
    background-size: 200% 200% !important;
    color: #ffffff !important;
    animation: none;
    box-shadow: 0 4px 15px rgba(194, 24, 91, 0.3) !important;
}

.tcf-btn-primary:hover:not(:disabled) {
    background: #2a2a2a !important;
    background-size: 200% 200% !important;
    color: #ffffff !important;
    animation: none;
    transform: translateY(-2px) !important;
}

.tcf-btn-secondary,
body .tcf-btn-secondary,
.tcf-main .tcf-btn-secondary {
    background: #111111 !important;
    background-size: 200% 200% !important;
    color: #ffffff !important;
    animation: none;
    box-shadow: 0 4px 15px rgba(194, 24, 91, 0.3) !important;
}

.tcf-btn-secondary:hover:not(:disabled) {
    background: #2a2a2a !important;
    background-size: 200% 200% !important;
    color: #ffffff !important;
    animation: none;
    transform: translateY(-2px) !important;
}

.tcf-btn-outline,
body .tcf-btn-outline {
    background: transparent !important;
    color: #C2185B !important;
    border: 2px solid #C2185B !important;
}

.tcf-btn-outline:hover:not(:disabled) {
    background: #C2185B !important;
    color: #ffffff !important;
}

.tcf-btn-success,
body .tcf-btn-success {
    background: #111111 !important;
    background-color: #111111 !important;
    color: #ffffff !important;
}

.tcf-btn-danger,
body .tcf-btn-danger {
    background: #dc2626 !important;
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

.tcf-btn-sm {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.8rem !important;
}

.tcf-btn-lg {
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
}

/* Forms */
.tcf-form-group {
    margin-bottom: 1rem;
}

.tcf-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--tcf-primary);
}

.tcf-input,
.tcf-select,
.tcf-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--tcf-border);
    border-radius: var(--tcf-radius-sm);
    background: var(--tcf-white);
    color: var(--tcf-dark);
    transition: var(--tcf-transition);
}

.tcf-input:focus,
.tcf-select:focus,
.tcf-textarea:focus {
    outline: none;
    border-color: var(--tcf-accent);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
}

.tcf-input::placeholder {
    color: var(--tcf-gray);
}

.tcf-input[readonly] {
    background: var(--tcf-light);
    color: var(--tcf-gray);
}

.tcf-textarea {
    min-height: 100px;
    resize: vertical;
}

/* Checkbox & Radio */
.tcf-checkbox,
.tcf-radio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.tcf-checkbox input,
.tcf-radio input {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--tcf-accent);
    cursor: pointer;
}

/* Tables - Full width without horizontal scroll */
.tcf-table-wrapper {
    overflow-x: visible !important;
    margin-bottom: 1.5rem;
}

.tcf-table,
body .tcf-table {
    width: 100% !important;
    border-collapse: collapse !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    table-layout: auto !important;
}

.tcf-table th,
.tcf-table td {
    padding: 0.5rem 0.4rem !important;
    text-align: left !important;
    border-bottom: 1px solid #e2e8f0 !important;
    font-size: 0.8rem !important;
    word-wrap: break-word !important;
}

.tcf-table th {
    background: #111111 !important;
    background-color: #111111 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    white-space: normal !important;
    font-size: 0.75rem !important;
    padding: 0.6rem 0.4rem !important;
}

.tcf-table tbody tr:hover {
    background: #f1f5f9 !important;
}

.tcf-table tbody tr:last-child td {
    border-bottom: none !important;
}

/* Table inputs - compact for fitting in cells */
.tcf-table .tcf-input,
.tcf-table input[type="number"],
.tcf-table input[type="text"] {
    width: 100% !important;
    min-width: 50px !important;
    max-width: 100% !important;
    padding: 0.3rem 0.4rem !important;
    font-size: 0.75rem !important;
    text-align: right !important;
}

/* Responsive Table - Cards on Mobile */
@media (max-width: 768px) {
    .tcf-table-wrapper {
        overflow-x: visible !important;
    }
    
    .tcf-table,
    .tcf-table-responsive {
        display: block !important;
        width: 100% !important;
    }
    
    .tcf-table-responsive thead,
    .tcf-table thead {
        display: none !important;
    }
    
    .tcf-table-responsive tbody,
    .tcf-table tbody {
        display: block !important;
    }
    
    .tcf-table-responsive tbody tr,
    .tcf-table tbody tr {
        display: block !important;
        margin-bottom: 1rem !important;
        background: rgba(255, 255, 255, 0.85) !important;
        border-radius: 12px !important;
        padding: 1rem !important;
        box-shadow: 0 4px 16px rgba(74, 13, 42, 0.12) !important;
        border: 2px solid rgba(173, 20, 87, 0.15) !important;
    }
    
    .tcf-table-responsive tbody td,
    .tcf-table tbody td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0.5rem 0 !important;
        border-bottom: 1px solid #e2e8f0 !important;
        text-align: right !important;
        font-size: 0.85rem !important;
    }
    
    .tcf-table-responsive tbody td:last-child,
    .tcf-table tbody td:last-child {
        border-bottom: none !important;
    }
    
    .tcf-table-responsive tbody td::before,
    .tcf-table tbody td::before {
        content: attr(data-label) !important;
        font-weight: 600 !important;
        color: #111111 !important;
        text-align: left !important;
        flex: 1 !important;
    }
    
    .tcf-table tbody td input,
    .tcf-table-responsive tbody td input {
        max-width: 100px !important;
        text-align: right !important;
    }
}

/* Header */
.tcf-header {
    background: var(--tcf-glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--tcf-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 1.5rem;
}

.tcf-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1440px;
    margin: 0 auto;
}

.tcf-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tcf-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--tcf-primary);
}

.tcf-logo img {
    width: 40px;
    height: 40px;
}

/* Hamburger menu - HIDDEN */
.tcf-hamburger {
    display: none !important;
    visibility: hidden !important;
}

.tcf-nav ul {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
}

.tcf-nav a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--tcf-dark);
    font-weight: 500;
    border-radius: var(--tcf-radius-sm);
    transition: var(--tcf-transition);
}

.tcf-nav a:hover {
    background: var(--tcf-light);
    color: var(--tcf-accent);
}

.tcf-nav i {
    font-size: 1rem;
}

.tcf-header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.tcf-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.tcf-user-name {
    font-weight: 600;
    color: var(--tcf-primary);
}

.tcf-user-role {
    font-size: 0.75rem;
    color: var(--tcf-gray);
}

.tcf-datetime {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.tcf-date {
    font-size: 0.875rem;
    color: var(--tcf-dark);
}

.tcf-time {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--tcf-primary);
    font-family: 'JetBrains Mono', monospace;
}

/* Footer */
.tcf-footer {
    background: var(--tcf-primary);
    color: var(--tcf-white);
    padding: 1.5rem;
    text-align: center;
    margin-top: auto;
}

.tcf-footer p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
}

.tcf-footer a {
    color: var(--tcf-white);
    text-decoration: underline;
}

/* Mobile Navigation - REMOVED ENTIRELY */
.tcf-mobile-nav {
    display: none !important;
}

/* Scroll to Top */
.tcf-scroll-top {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--tcf-accent);
    color: var(--tcf-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--tcf-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tcf-scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.tcf-scroll-top:hover {
    background: var(--tcf-primary);
    transform: scale(1.1);
}

.tcf-scroll-progress {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.tcf-scroll-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 4;
}

.tcf-scroll-indicator {
    fill: none;
    stroke: var(--tcf-white);
    stroke-width: 4;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    stroke-linecap: round;
}

/* Main Content */
.tcf-main {
    min-height: calc(100vh - 200px);
    padding: 2rem 1.5rem;
    padding-bottom: 2rem;
}

.tcf-container {
    max-width: 1440px;
    margin: 0 auto;
}

/* Page Title */
.tcf-page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.tcf-page-title h1 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.tcf-page-title h1 i {
    color: var(--tcf-accent);
}

/* Dashboard Cards Grid */
.tcf-cards-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
    margin-bottom: 2rem !important;
}

.tcf-card,
body .tcf-card,
.tcf-main .tcf-card {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-radius: 16px !important;
    border: 2px solid rgba(173, 20, 87, 0.2) !important;
    box-shadow: 
        0 8px 32px rgba(74, 13, 42, 0.15),
        0 4px 16px rgba(173, 20, 87, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    padding: 1.5rem !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    color: #0f172a !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
}

.tcf-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 
        0 16px 48px rgba(74, 13, 42, 0.2),
        0 8px 24px rgba(173, 20, 87, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(37, 99, 235, 0.35) !important;
}

.tcf-card-icon,
body .tcf-card-icon {
    width: 56px !important;
    height: 56px !important;
    border-radius: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.5rem !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Font Awesome icon fix with high specificity */
.tcf-card-icon i,
.tcf-card-icon .fas,
.tcf-card-icon .fa,
.tcf-card-icon .far,
.tcf-card-icon .fab,
body .tcf-card-icon i,
.tcf-main .tcf-card-icon i {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", FontAwesome !important;
    font-weight: 900 !important;
    font-style: normal !important;
    font-size: 1.5rem !important;
    color: #ffffff !important;
    display: inline-block !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

.tcf-card-title,
body .tcf-card-title {
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    color: #111111 !important;
    margin: 0 !important;
}

.tcf-card-description,
body .tcf-card-description {
    font-size: 0.875rem !important;
    color: #64748b !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

.tcf-card-btn {
    margin-top: auto !important;
}

/* Login Page */
.tcf-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--tcf-primary) 0%, var(--tcf-secondary) 100%);
}

.tcf-login-box {
    background: var(--tcf-glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--tcf-radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.tcf-login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.tcf-login-logo img {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

.tcf-login-logo h1 {
    font-size: 1.5rem;
    margin: 0;
}

.tcf-login-form .tcf-form-group {
    margin-bottom: 1.5rem;
}

.tcf-login-form .tcf-btn {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
}

/* Password Toggle */
.tcf-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.tcf-password-wrapper .tcf-input {
    padding-right: 3rem;
    width: 100%;
}

.tcf-password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.tcf-password-toggle:hover {
    color: #111111;
}

.tcf-password-toggle i {
    font-size: 1rem;
}

/* Order Table */
.tcf-order-table .tcf-input {
    min-width: 80px;
    text-align: right;
}

.tcf-order-total {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--tcf-light);
    border-radius: var(--tcf-radius-sm);
    margin-top: 1rem;
}

.tcf-order-total-item {
    display: flex;
    flex-direction: column;
}

.tcf-order-total-label {
    font-size: 0.75rem;
    color: var(--tcf-gray);
    text-transform: uppercase;
}

.tcf-order-total-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tcf-primary);
}

/* Payment Section */
.tcf-payment-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--tcf-light);
    border-radius: var(--tcf-radius);
}

.tcf-payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tcf-payment-method {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--tcf-white);
    border: 2px solid var(--tcf-border);
    border-radius: var(--tcf-radius-sm);
    cursor: pointer;
    transition: var(--tcf-transition);
}

.tcf-payment-method:hover {
    border-color: var(--tcf-accent);
}

.tcf-payment-method.active {
    border-color: var(--tcf-accent);
    background: rgba(49, 130, 206, 0.1);
}

.tcf-payment-method input {
    display: none;
}

.tcf-bank-options {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--tcf-white);
    border-radius: var(--tcf-radius-sm);
}

.tcf-bank-options.visible {
    display: block;
}

.tcf-bank-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
}

.tcf-split-payment {
    display: none;
    margin-top: 1rem;
    gap: 1rem;
}

.tcf-split-payment.visible {
    display: flex;
    flex-wrap: wrap;
}

/* Confirmation Modal */
.tcf-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--tcf-transition);
}

.tcf-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.tcf-modal {
    background: var(--tcf-white);
    border-radius: var(--tcf-radius);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--tcf-transition);
}

.tcf-modal-overlay.visible .tcf-modal {
    transform: scale(1);
}

.tcf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--tcf-border);
}

.tcf-modal-header h3 {
    margin: 0;
}

.tcf-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--tcf-gray);
}

.tcf-modal-body {
    padding: 1.5rem;
}

.tcf-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--tcf-border);
}

/* Debtor Cards */
.tcf-debtor-card {
    cursor: pointer;
}

.tcf-debtor-balance {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tcf-danger);
}

.tcf-debtor-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--tcf-primary);
}

/* Calendar */
.tcf-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.tcf-calendar-header {
    text-align: center;
    padding: 0.5rem;
    font-weight: 600;
    color: var(--tcf-primary);
    background: var(--tcf-light);
}

.tcf-calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: var(--tcf-white);
    border: 1px solid var(--tcf-border);
    border-radius: var(--tcf-radius-sm);
    cursor: pointer;
    transition: var(--tcf-transition);
}

.tcf-calendar-day:hover:not(.disabled) {
    border-color: var(--tcf-accent);
}

.tcf-calendar-day.today {
    border-color: var(--tcf-accent);
    background: rgba(49, 130, 206, 0.1);
}

.tcf-calendar-day.reconciled {
    background: var(--tcf-success);
    color: var(--tcf-white);
}

.tcf-calendar-day.partial {
    background: var(--tcf-warning);
    color: var(--tcf-white);
}

.tcf-calendar-day.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Filter Section */
.tcf-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--tcf-light);
    border-radius: var(--tcf-radius-sm);
}

.tcf-filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tcf-filter-group label {
    font-weight: 600;
    white-space: nowrap;
}

.tcf-filter-group .tcf-input,
.tcf-filter-group .tcf-select {
    width: auto;
    min-width: 150px;
}

/* Toast Notifications */
.tcf-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tcf-toast {
    padding: 1rem 1.5rem;
    border-radius: var(--tcf-radius-sm);
    color: var(--tcf-white);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.tcf-toast-success { background: var(--tcf-success); }
.tcf-toast-error { background: var(--tcf-danger); }
.tcf-toast-warning { background: var(--tcf-warning); }
.tcf-toast-info { background: var(--tcf-accent); }

/* Loading */
.tcf-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.tcf-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--tcf-border);
    border-top-color: var(--tcf-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Offline Banner */
.tcf-offline-banner {
    position: fixed;
    bottom: 70px;
    left: 0;
    right: 0;
    background: var(--tcf-warning);
    color: var(--tcf-white);
    text-align: center;
    padding: 0.5rem;
    font-weight: 600;
    z-index: 999;
    display: none;
}

.tcf-offline-banner.visible {
    display: block;
}

/* Admin Panel Section */
.tcf-admin-section {
    background: var(--tcf-glass-bg);
    border-radius: var(--tcf-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.tcf-admin-section h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--tcf-border);
}

/* Responsive */
@media (max-width: 1024px) {
    .tcf-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--tcf-white);
        box-shadow: 0 4px 20px var(--tcf-shadow);
        padding: 1rem;
    }
    
    .tcf-nav.open {
        display: block;
    }
    
    .tcf-nav ul {
        flex-direction: column;
    }
    
    .tcf-nav a {
        padding: 0.75rem 1rem;
    }
    
    .tcf-hamburger {
        display: none !important;
        visibility: hidden !important;
    }
    
    .tcf-header-right {
        gap: 1rem;
    }
    
    .tcf-user-info {
        display: none;
    }
}

/* Mobile styles - NO bottom nav padding */
@media (max-width: 768px) {
    .tcf-main {
        padding-bottom: 20px;
    }
    
    .tcf-scroll-top {
        bottom: 40px;
    }
    
    .tcf-datetime {
        display: none;
    }
    
    .tcf-logo span {
        display: none;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.125rem; }
    
    .tcf-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .tcf-page-title {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Mobile nav REMOVED - no padding needed */
.tcf-main {
    padding-bottom: 20px !important;
}

/* ============================================
   GLOBAL FONT SIZE BOOST - Bigger fonts across site
   ============================================ */
body, html {
    font-size: 18px !important;
}

/* Increase all text elements */
.tcf-main, .tcf-main * {
    font-size: inherit;
}

/* Tables - Bigger text */
table, .tcf-table {
    font-size: 1.1rem !important;
}

table th, table td,
.tcf-table th, .tcf-table td {
    font-size: 1.1rem !important;
    padding: 0.75rem 1rem !important;
}

/* Form inputs - Bigger */
input, select, textarea,
.tcf-input, .tcf-select, .tcf-textarea {
    font-size: 1.1rem !important;
    padding: 0.75rem 1rem !important;
}

/* Labels bigger */
label, .tcf-label {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
}

/* Buttons bigger */
button, .tcf-btn {
    font-size: 1.1rem !important;
    padding: 0.75rem 1.25rem !important;
}

/* Cards and content */
.tcf-card, .tcf-glass {
    font-size: 1.1rem !important;
}

/* Debtor cards */
.tcf-debtor-card .card-name {
    font-size: 1.3rem !important;
}

.tcf-debtor-card .card-balance {
    font-size: 1.5rem !important;
}

.tcf-debtor-card .card-phone {
    font-size: 1.1rem !important;
}

/* Order/History amounts */
.amount, .price, .total,
[class*="amount"], [class*="price"], [class*="total"] {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
}

/* Price displays */
.tcf-price, .tcf-amount, .tcf-total,
.receipt-amount, .row-total, .grand-total {
    font-size: 1.3rem !important;
    font-weight: 800 !important;
}

/* Make headings even bigger */
h1 { font-size: 2.5rem !important; }
h2 { font-size: 2rem !important; }
h3 { font-size: 1.75rem !important; }
h4 { font-size: 1.5rem !important; }
h5 { font-size: 1.25rem !important; }
h6 { font-size: 1.1rem !important; }

/* Page titles */
.tcf-page-title h1 {
    font-size: 2.2rem !important;
}

/* Navigation */
.tcf-nav a {
    font-size: 1rem !important;
}

/* ============================================
   Floating Header, Right Drawer, Bottom Menu
   ============================================ */
.tcf-header,
body .tcf-header {
    width: min(calc(100% - 32px), 1440px) !important;
    margin: 16px auto 0 !important;
    padding: 0.65rem 0.8rem !important;
    position: sticky !important;
    top: calc(var(--wp-admin--admin-bar--height, 0px) + 16px) !important;
    z-index: 9998 !important;
    border: 1px solid rgba(194, 24, 91, 0.12) !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(18px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(150%) !important;
    box-shadow: 0 18px 45px rgba(74, 13, 42, 0.16), inset 0 1px 0 rgba(255,255,255,0.9) !important;
}

.tcf-header-inner {
    max-width: none !important;
    min-height: 64px !important;
    gap: 1rem !important;
}

.tcf-header-left,
.tcf-header-right {
    min-width: 0 !important;
}

.tcf-logo {
    min-width: 0 !important;
    gap: 0.7rem !important;
    font-size: 1.05rem !important;
    line-height: 1.1 !important;
    color: var(--tcf-primary) !important;
}

.tcf-logo img {
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    object-fit: contain !important;
    flex: 0 0 auto !important;
}

.tcf-logo span {
    display: inline-block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.tcf-nav {
    display: none !important;
}

.tcf-header-right {
    gap: 0.8rem !important;
    flex: 0 1 auto !important;
}

.tcf-user-info {
    display: flex !important;
    align-items: flex-end !important;
    min-width: 120px !important;
    max-width: 280px !important;
}

.tcf-user-name {
    max-width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 0.86rem !important;
    line-height: 1.15 !important;
}

.tcf-user-role {
    font-size: 0.68rem !important;
    line-height: 1.1 !important;
}

.tcf-datetime {
    display: flex !important;
    min-width: 118px !important;
    line-height: 1.1 !important;
}

.tcf-date {
    font-size: 0.72rem !important;
    white-space: nowrap !important;
}

.tcf-time {
    font-size: 1rem !important;
    letter-spacing: 0 !important;
}

.tcf-header #tcf-logout-btn {
    min-height: 42px !important;
    padding: 0.5rem 0.8rem !important;
    border: 2px solid var(--tcf-primary) !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    color: var(--tcf-primary) !important;
    box-shadow: none !important;
}

.tcf-header #tcf-logout-btn:hover {
    background: var(--tcf-danger) !important;
    border-color: var(--tcf-danger) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

.tcf-header #tcf-logout-btn:hover i,
.tcf-header #tcf-logout-btn:hover span {
    color: #ffffff !important;
}

.tcf-menu-trigger {
    width: 46px !important;
    height: 46px !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: var(--tcf-primary) !important;
    color: #ffffff !important;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    cursor: pointer !important;
    box-shadow: 0 10px 22px rgba(194, 24, 91, 0.22) !important;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease !important;
}

.tcf-menu-trigger span {
    width: 19px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    display: block !important;
    transition: transform 0.2s ease, opacity 0.2s ease !important;
}

.tcf-menu-trigger:hover {
    background: var(--tcf-danger) !important;
    transform: translateY(-2px) scale(1.03) !important;
}

.tcf-menu-trigger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg) !important;
}

.tcf-menu-trigger.active span:nth-child(2) {
    opacity: 0 !important;
}

.tcf-menu-trigger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg) !important;
}

.tcf-drawer-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, 0.46) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: 9998 !important;
    transition: opacity 0.24s ease, visibility 0.24s ease !important;
}

.tcf-drawer-menu {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: min(386px, calc(100vw - 24px)) !important;
    height: 100vh !important;
    background: #ffffff !important;
    border-left: 1px solid rgba(194, 24, 91, 0.12) !important;
    box-shadow: -24px 0 60px rgba(74, 13, 42, 0.22) !important;
    transform: translateX(110%) !important;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 9999 !important;
    padding: 1.1rem !important;
    overflow-y: auto !important;
}

body.tcf-drawer-open .tcf-drawer-backdrop {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

body.tcf-drawer-open .tcf-drawer-menu {
    transform: translateX(0) !important;
}

.tcf-drawer-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    padding: 0.25rem 0.25rem 1rem !important;
    border-bottom: 1px solid rgba(194, 24, 91, 0.12) !important;
    margin-bottom: 0.75rem !important;
}

.tcf-drawer-kicker {
    color: var(--tcf-danger) !important;
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase !important;
}

.tcf-drawer-head h2 {
    margin: 0 !important;
    color: var(--tcf-primary) !important;
    font-size: 1.35rem !important;
}

.tcf-drawer-close {
    width: 42px !important;
    height: 42px !important;
    border: 0 !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f8fafc !important;
    color: var(--tcf-primary) !important;
    cursor: pointer !important;
}

.tcf-drawer-close:hover {
    background: var(--tcf-danger) !important;
    color: #ffffff !important;
}

.tcf-drawer-close iconify-icon {
    font-size: 1.45rem !important;
}

.tcf-drawer-nav {
    display: grid !important;
    gap: 0.45rem !important;
}

.tcf-drawer-nav a {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    padding: 0.75rem 0.85rem !important;
    border-radius: 14px !important;
    color: var(--tcf-primary) !important;
    background: #ffffff !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
    font-weight: 750 !important;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease !important;
}

.tcf-drawer-nav a:hover {
    background: var(--tcf-danger) !important;
    color: #ffffff !important;
    transform: translateX(-4px) !important;
}

.tcf-drawer-nav iconify-icon {
    font-size: 1.3rem !important;
    flex: 0 0 auto !important;
}

.tcf-bottom-nav {
    display: none !important;
}

.tcf-bottom-nav-item {
    display: none !important;
}

.tcf-main,
body .tcf-main {
    padding-bottom: 2rem !important;
}

body.logged-in {
    padding-bottom: 0 !important;
}

.tcf-scroll-top {
    bottom: 24px !important;
}

.tcf-icon-credit {
    font-size: 0.68rem !important;
    opacity: 0.78 !important;
}

@media (max-width: 768px) {
    .tcf-header {
        margin-top: 10px !important;
        padding: 0.5rem !important;
    }

    .tcf-header-inner {
        min-height: 56px !important;
        gap: 0.5rem !important;
    }

    .tcf-logo span {
        display: inline-block !important;
        max-width: 42vw !important;
        font-size: 0.85rem !important;
    }

    .tcf-datetime,
    .tcf-user-info {
        display: none !important;
    }

    .tcf-header #tcf-logout-btn {
        min-width: 42px !important;
        padding: 0.45rem !important;
    }

    .tcf-header #tcf-logout-btn span {
        display: none !important;
    }
}

/* Summary cards numbers */
.tcf-summary-card .number,
.tcf-stat-number, .stat-number {
    font-size: 2rem !important;
}

/* Admin panel */
.tcf-admin-number {
    font-size: 2.5rem !important;
}

/* Print Styles */
@media print {
    .tcf-header,
    .tcf-footer,
    .tcf-mobile-nav,
    .tcf-bottom-nav,
    .tcf-drawer-backdrop,
    .tcf-drawer-menu,
    .tcf-scroll-top,
    .tcf-btn {
        display: none !important;
    }
    
    .tcf-main {
        padding: 0;
    }

    body {
        padding-bottom: 0 !important;
    }
    
    .tcf-glass {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* =========================================================
   Clean brand theme (v1.0.8)
   Magenta chrome + white surfaces — no black form backgrounds
   ========================================================= */
:root {
    --tcf-primary: #C2185B !important;
    --tcf-primary-light: #e91e63 !important;
    --tcf-secondary: #ad1457 !important;
    --tcf-secondary-light: #c2185b !important;
    --tcf-accent: #C2185B !important;
    --tcf-success: #15803d !important;
    --tcf-success-light: #16a34a !important;
    --tcf-warning: #a16207 !important;
    --tcf-light: #f8fafc !important;
    --tcf-lighter: #ffffff !important;
    --tcf-gray: #64748b !important;
    --tcf-gray-light: #94a3b8 !important;
    --tcf-dark: #0f172a !important;
    --tcf-border: #e2e8f0 !important;
    --tcf-border-dark: #cbd5e1 !important;
    --tcf-shadow: rgba(194, 24, 91, 0.08) !important;
    --tcf-shadow-lg: rgba(194, 24, 91, 0.14) !important;
    --tcf-glass-bg: #ffffff !important;
    --tcf-glass-border: rgba(194, 24, 91, 0.1) !important;
    --tcf-glass-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(194, 24, 91, 0.08) !important;
    --tcf-radius: 12px !important;
    --tcf-radius-sm: 8px !important;
    --tcf-radius-lg: 16px !important;
    --tcf-gradient-primary: linear-gradient(135deg, #C2185B, #ad1457) !important;
    --tcf-gradient-accent: linear-gradient(135deg, #C2185B, #e91e63) !important;
}

body,
.tcf-main {
    background: #f8fafc !important;
    color: #0f172a !important;
}

.tcf-glass,
.glass,
.tcf-card,
#tcf-stock-form,
#ote-stock-form {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(194, 24, 91, 0.06) !important;
    border-radius: 12px !important;
    backdrop-filter: none !important;
}

.page-header,
.tcf-page-header,
.tcf-page-header-custom,
.tcf-form-header,
.tcf-order-header,
.tcf-debtor-header,
.tcf-profoma-header,
[class*="page-header"],
.header-bar {
    background: linear-gradient(135deg, #C2185B, #ad1457) !important;
    background-image: linear-gradient(135deg, #C2185B, #ad1457) !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}

.page-header h1,
.page-header h1 i,
.tcf-page-header *,
.tcf-page-header-custom *,
.tcf-form-header *,
.tcf-profoma-header h1,
.tcf-profoma-header h2,
.tcf-profoma-header span {
    color: #ffffff !important;
}

.tcf-table th,
table th,
.order-table th,
.tcf-profoma-table th,
#tcf-stock-table th {
    background: #C2185B !important;
    background-color: #C2185B !important;
    background-image: none !important;
    color: #ffffff !important;
}

.tcf-btn-primary,
body .tcf-btn-primary,
.btn-primary,
.btn-success,
.tcf-btn-success,
body .tcf-btn-success {
    background: #C2185B !important;
    background-image: none !important;
    background-color: #C2185B !important;
    color: #ffffff !important;
    box-shadow: none !important;
    animation: none !important;
    border: none !important;
}

.tcf-btn-primary:hover:not(:disabled),
.btn-primary:hover,
.btn-success:hover,
.tcf-btn-success:hover:not(:disabled) {
    background: #ad1457 !important;
    background-image: none !important;
    transform: none !important;
    animation: none !important;
    box-shadow: none !important;
}

.tcf-btn-outline,
.btn-outline,
body .tcf-btn-outline {
    background: #ffffff !important;
    color: #C2185B !important;
    border: 1px solid #C2185B !important;
    box-shadow: none !important;
}

.tcf-btn-outline:hover:not(:disabled),
.btn-outline:hover {
    background: #C2185B !important;
    color: #ffffff !important;
}

.tcf-btn-accent,
.tcf-menu-trigger,
#tcf-menu-toggle {
    background: #C2185B !important;
    color: #ffffff !important;
}

h1, h2, h3, h4, h5, h6,
.tcf-page-title h1,
.tcf-main .tcf-page-title h1 {
    color: #0f172a !important;
}

.tcf-page-title h1 i {
    color: #C2185B !important;
}

.tcf-footer {
    background: #C2185B !important;
    color: #ffffff !important;
}

.order-totals,
.totals-bar,
.confirm-totals,
.tcf-totals,
.order-summary {
    background: linear-gradient(135deg, #C2185B, #ad1457) !important;
    background-image: linear-gradient(135deg, #C2185B, #ad1457) !important;
    color: #ffffff !important;
}

.row-total,
.closing,
.tcf-grand-total,
#tcf-grand-total,
#grand-total {
    color: #0f172a !important;
}

.order-summary .summary-value,
.order-summary .summary-value.grand,
.confirm-totals .grand {
    color: #ffffff !important;
}

.alert-success,
.tcf-alert-success {
    background: #ecfdf5 !important;
    color: #065f46 !important;
    border: 1px solid #a7f3d0 !important;
}

button[data-tcf-brutal-whatsapp],
.tcf-btn-whatsapp {
    background: #25D366 !important;
}

/* Readable form controls */
.tcf-input,
.form-input,
input[type="number"],
input[type="text"],
input[type="date"],
select,
textarea {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

/* Stock inventory: always allow horizontal scroll (overrides global overflow rules) */
#tcf-stock-form .tcf-stock-scroll,
#tcf-stock-form .tcf-table-wrapper.tcf-stock-scroll {
    overflow-x: auto !important;
    overflow-y: visible !important;
    max-width: 100% !important;
    width: 100% !important;
    -webkit-overflow-scrolling: touch !important;
}

#tcf-stock-table.tcf-table,
#tcf-stock-table {
    display: table !important;
    width: max-content !important;
    min-width: 1500px !important;
    max-width: none !important;
    overflow: visible !important;
    table-layout: fixed !important;
    border-radius: 0 !important;
}

@media (max-width: 768px) {
    #tcf-stock-form .tcf-stock-scroll {
        overflow-x: auto !important;
    }
    #tcf-stock-table.tcf-table,
    #tcf-stock-table,
    #tcf-stock-table thead,
    #tcf-stock-table tbody,
    #tcf-stock-table tr,
    #tcf-stock-table th,
    #tcf-stock-table td {
        display: revert !important;
    }
    #tcf-stock-table {
        display: table !important;
    }
    #tcf-stock-table thead {
        display: table-header-group !important;
    }
    #tcf-stock-table tbody {
        display: table-row-group !important;
    }
    #tcf-stock-table tr {
        display: table-row !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
    }
    #tcf-stock-table th,
    #tcf-stock-table td {
        display: table-cell !important;
        width: auto !important;
    }
    #tcf-stock-table thead {
        display: table-header-group !important;
    }
    #tcf-stock-table td::before {
        content: none !important;
        display: none !important;
    }
}

.multi-unit-qty label {
    color: #64748b !important;
}

/* End stock scroll overrides */

/* =========================================================
   MOBILE RESPONSIVE SYSTEM (v1.0.11)
   Real device-width layouts for phones & small tablets
   ========================================================= */
body, html {
    font-size: 16px !important;
}

.tcf-container,
.container {
    width: 100% !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    box-sizing: border-box !important;
}

.tcf-main {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1rem !important;
    box-sizing: border-box !important;
}

.tcf-header,
.tcf-header-inner,
.tcf-glass,
.glass,
#tcf-stock-form,
.tcf-filters {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Default tables: allow horizontal scroll instead of clipping */
.tcf-table-wrapper,
.table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    max-width: 100% !important;
}

@media (max-width: 900px) {
    body, html {
        font-size: 15px !important;
    }

    .tcf-main {
        padding: 0.75rem !important;
    }

    .tcf-container,
    .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .tcf-header {
        margin: 0.5rem !important;
        border-radius: 14px !important;
    }

    .tcf-header-inner {
        min-height: 56px !important;
        gap: 0.5rem !important;
        padding: 0.45rem 0.65rem !important;
    }

    .tcf-logo img {
        width: 36px !important;
        height: 36px !important;
    }

    .tcf-logo span {
        font-size: 0.85rem !important;
        max-width: 42vw !important;
    }

    .tcf-user-info,
    .tcf-datetime {
        display: none !important;
    }

    .tcf-header #tcf-logout-btn span {
        display: none !important;
    }

    .tcf-header #tcf-logout-btn {
        min-width: 42px !important;
        padding: 0.45rem !important;
        justify-content: center !important;
    }

    .tcf-menu-trigger,
    #tcf-menu-toggle {
        width: 42px !important;
        height: 42px !important;
    }

    .tcf-drawer-menu {
        width: min(86vw, 320px) !important;
    }

    .page-header,
    .tcf-page-header,
    .tcf-page-header-custom,
    [class*="page-header"] {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.65rem !important;
        padding: 0.85rem !important;
    }

    .page-header h1,
    .tcf-page-header-custom h1 {
        font-size: 0.95rem !important;
    }

    .tcf-filters,
    .filters {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }

    .tcf-filter-group,
    .filter-group {
        width: 100% !important;
    }

    .tcf-filter-group .tcf-input,
    .filter-input,
    .tcf-filters .tcf-btn,
    .filters .btn {
        width: 100% !important;
    }

    .tcf-glass,
    .glass {
        padding: 1rem !important;
        border-radius: 12px !important;
    }

    /* Readable touch targets */
    input, select, textarea,
    .tcf-input, .form-input {
        font-size: 16px !important; /* prevents iOS zoom */
        min-height: 44px !important;
    }

    button, .tcf-btn, .btn, .action-btn {
        min-height: 44px !important;
        font-size: 0.9rem !important;
    }

    table, .tcf-table {
        font-size: 0.85rem !important;
    }

    table th, table td,
    .tcf-table th, .tcf-table td {
        font-size: 0.8rem !important;
        padding: 0.55rem 0.45rem !important;
    }

    .order-summary,
    .payment-methods {
        grid-template-columns: 1fr 1fr !important;
    }

    .payment-methods {
        display: grid !important;
        gap: 0.5rem !important;
    }

    .payment-method {
        min-width: 0 !important;
    }

    .confirm-modal .confirm-content,
    .view-content,
    .receipt-content,
    .ote-modal,
    .tcf-modal {
        width: min(96vw, 520px) !important;
        max-height: 88vh !important;
    }

    .tcf-cards-grid,
    .analytics-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem !important;
    }
}

@media (max-width: 900px) {
    .tcf-home-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.85rem !important;
    }
}

@media (max-width: 600px) {
    .tcf-home-grid {
        grid-template-columns: 1fr !important;
    }

    .tcf-cards-grid,
    .analytics-grid {
        grid-template-columns: 1fr !important;
    }

    .order-summary {
        grid-template-columns: 1fr 1fr !important;
    }

    .payment-methods {
        grid-template-columns: 1fr !important;
    }

    .header-buttons,
    .page-header .btn,
    .tcf-page-actions {
        width: 100% !important;
    }

    .header-buttons a,
    .tcf-page-actions a,
    .tcf-btn-history-custom {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Take Order: stack each product as a card */
    .order-table,
    #order-form .order-table {
        min-width: 0 !important;
        width: 100% !important;
        border-collapse: separate !important;
        border-spacing: 0 0.75rem !important;
    }

    .order-table thead {
        display: none !important;
    }

    .order-table tbody,
    .order-table tr,
    .order-table td {
        display: block !important;
        width: 100% !important;
    }

    .order-table tbody tr {
        background: #fff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        padding: 0.85rem !important;
        box-shadow: 0 4px 14px rgba(194, 24, 91, 0.06) !important;
    }

    .order-table td {
        border: none !important;
        padding: 0.35rem 0 !important;
    }

    .order-table td.product-name {
        font-size: 1rem !important;
        margin-bottom: 0.35rem !important;
    }

    .order-table td.price::before {
        content: "Price";
        display: block;
        font-size: 0.68rem;
        font-weight: 800;
        color: #64748b;
        text-transform: uppercase;
        margin-bottom: 0.15rem;
    }

    .order-table td.qty-cell::before {
        content: "Quantity";
        display: block;
        font-size: 0.68rem;
        font-weight: 800;
        color: #64748b;
        text-transform: uppercase;
        margin-bottom: 0.25rem;
    }

    .order-table td.row-total::before {
        content: "Line total";
        display: block;
        font-size: 0.68rem;
        font-weight: 800;
        color: #64748b;
        text-transform: uppercase;
        margin-bottom: 0.15rem;
    }

    .order-table .multi-unit-qty {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .order-table input.qty-input,
    .order-table input.disc-input {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    /* Stock: keep table + sideways scroll; shrink sticky item a bit */
    #tcf-stock-table {
        min-width: 1180px !important;
    }

    #tcf-stock-table th,
    #tcf-stock-table td {
        min-width: 130px !important;
        padding: 0.5rem 0.45rem !important;
    }

    #tcf-stock-table th:first-child,
    #tcf-stock-table td:first-child {
        min-width: 120px !important;
        width: 120px !important;
        max-width: 130px !important;
    }

    #tcf-stock-table .stock-qty-text {
        min-width: 120px !important;
        width: 120px !important;
        max-width: 140px !important;
        font-size: 0.72rem !important;
    }

    .view-meta {
        grid-template-columns: 1fr !important;
    }

    .receipt-modal .receipt-content {
        width: min(92vw, 80mm) !important;
    }
}

@media (max-width: 380px) {
    .tcf-logo span {
        display: none !important;
    }

    .order-table .multi-unit-qty {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.4rem !important;
    }
}

