/* ===================================
   BAIT ALAMER PRICING CALCULATOR
   Modern, Clean, Professional Design
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Scrollbar styling for webkit browsers */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #1a252f;
    border-left: 1px solid #4a5f7f;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #f39c12, #e67e22);
    border-radius: 6px;
    border: 2px solid #1a252f;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #e67e22, #d35400);
}

:root {
    /* Dark Professional Theme - Like Reference Image */
    --primary-color: #2c3e50;
    --primary-hover: #233140;
    --secondary-color: #34495e;
    --accent-gold: #f39c12;
    --accent-gold-hover: #e67e22;
    --danger-color: #e74c3c;
    --success-color: #2ecc71;
    --background: #1a252f;
    --card-background: #2c3e50;
    --card-hover: #34495e;
    --table-bg: #34495e;
    --table-row: #3d4d5d;
    --border-color: #4a5f7f;
    --border-accent: #f39c12;
    --text-primary: #ecf0f1;
    --text-secondary: #95a5a6;
    --text-gold: #f39c12;
    --text-white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);
    --gradient-dark: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    --gradient-gold: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: #1a252f;
    background-image: 
        linear-gradient(135deg, #1a252f 0%, #2c3e50 50%, #1a252f 100%),
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(243, 156, 18, 0.02) 35px, rgba(243, 156, 18, 0.02) 70px);
    color: var(--text-primary);
    line-height: 1.6;
    letter-spacing: 0.3px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================
   HEADER
   ================== */

.page-header {
    background: #2c3e50;
    color: white;
    padding: 40px 50px;
    border-radius: 0;
    margin-bottom: 35px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    border-bottom: 3px solid #f39c12;
    position: relative;
    overflow: hidden;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-gold);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.page-header::after {
    content: '🏠';
    position: absolute;
    font-size: 120px;
    opacity: 0.03;
    right: -20px;
    top: 50%;
    transform: translateY(-50%) rotate(-15deg);
    pointer-events: none;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.header-logo {
    flex-shrink: 0;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.header-logo:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 8px 24px rgba(243, 156, 18, 0.4);
}

.header-logo img {
    height: 120px;
    width: auto;
    display: block;
    background: white;
    transition: all 0.3s ease;
}

.header-text {
    flex: 1;
    text-align: center;
}

.page-header h1 {
    font-size: 2.8rem;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: none;
    color: #f39c12;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 1;
    color: #95a5a6;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.language-toggle {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 10;
}

.language-toggle button {
    background: transparent;
    border: 2px solid #f39c12;
    color: #f39c12;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.language-toggle button:hover {
    background: #f39c12;
    color: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
}

/* ==================
   SECTION HEADERS
   ================== */

section {
    background: #2c3e50;
    border-radius: 8px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    border: 1px solid #4a5f7f;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out backwards;
    position: relative;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.3s; }

section:hover {
    box-shadow: var(--shadow-lg);
    border-color: #f39c12;
    transform: translateY(-3px);
}

section h2 {
    font-size: 1.8rem;
    color: #f39c12;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f39c12;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
}

section h2::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #f39c12, #e67e22);
    border-radius: 2px;
    animation: slideRight 1s ease-out;
}

@keyframes slideRight {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 80px;
        opacity: 1;
    }
}

/* ==================
   HEADER FIELDS
   ================== */

.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.field-group {
    display: flex;
    flex-direction: column;
}

.field-group.full-width {
    grid-column: 1 / -1;
}

.field-group label {
    font-weight: 600;
    margin-bottom: 10px;
    color: #ecf0f1;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.required {
    color: #e74c3c;
    font-weight: bold;
    margin-right: 3px;
}

.conditional-required {
    color: #7f8c8d;
    font-weight: bold;
    margin-right: 3px;
    transition: color 0.3s;
}

.conditional-required.active {
    color: #e74c3c;
}

.field-group input,
.field-group textarea {
    padding: 14px 16px;
    border: 1px solid #4a5f7f;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #34495e;
    color: #ecf0f1;
    font-weight: 500;
}

.field-group input:focus,
.field-group textarea:focus {
    outline: none;
    border-color: #f39c12;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.2), 0 4px 12px rgba(243, 156, 18, 0.1);
    background: #3d4d5d;
    transform: translateY(-2px);
}

.field-group input::placeholder,
.field-group textarea::placeholder {
    color: #7f8c8d;
}

.field-group input.error,
.field-group textarea.error {
    border-color: var(--danger-color);
}

.help-text {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 4px;
    font-style: italic;
}

.error-message {
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 4px;
    font-weight: 500;
    display: none;
}

.error-message.show {
    display: block;
}

/* ==================
   CATEGORIES
   ================== */

.category {
    border: 1px solid #4a5f7f;
    border-radius: 6px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #34495e;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.category::before {
    content: '🎨';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    opacity: 0.05;
    pointer-events: none;
    transition: all 0.4s ease;
    z-index: 0;
}

.category:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.category:hover::before {
    opacity: 0.08;
    transform: translateY(-50%) rotate(10deg) scale(1.1);
}

.category.has-selected {
    border-color: #f39c12;
    box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.2);
}

.category-header {
    background: #3d4d5d;
    padding: 18px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid #4a5f7f;
    position: relative;
    z-index: 1;
}

.category-header:hover {
    background: #4a5f7f;
    border-bottom-color: #f39c12;
    padding-left: 30px;
}

.category-header.expanded {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #f39c12;
    border-bottom-color: #f39c12;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.category-title {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ecf0f1;
}

.category-header.expanded .category-title {
    color: #f39c12;
}

.category-icon {
    font-size: 1.3rem;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.category-header.expanded .category-icon {
    transform: rotate(90deg) scale(1.2);
    filter: drop-shadow(0 2px 4px rgba(243, 156, 18, 0.3));
}

.category-info {
    font-size: 0.85rem;
    color: #95a5a6;
}

.category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.category-content.expanded {
    max-height: 10000px;
    opacity: 1;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease 0.1s;
}

/* ==================
   ITEMS
   ================== */

.item-row {
    padding: 20px 25px;
    border-bottom: 1px solid #4a5f7f;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    position: relative;
    z-index: 1;
}

.item-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, rgba(243, 156, 18, 0.15), transparent);
    transition: width 0.3s ease;
    pointer-events: none;
    z-index: -1;
}

.item-row:last-child {
    border-bottom: none;
}

.item-row:hover {
    background: rgba(74, 95, 127, 0.3);
    padding-left: 28px;
}

.item-row:hover::before {
    width: 100%;
}

.item-row.selected {
    background: rgba(243, 156, 18, 0.1);
    border-left: 3px solid #f39c12;
    padding-left: 27px;
    animation: itemSelect 0.4s ease;
}

@keyframes itemSelect {
    0% {
        background: rgba(243, 156, 18, 0.3);
        transform: scale(1.02);
    }
    100% {
        background: rgba(243, 156, 18, 0.1);
        transform: scale(1);
    }
}

.item-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.item-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    margin-top: 2px;
    accent-color: #f39c12;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    z-index: 10;
}

.item-checkbox:hover {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 2px 6px rgba(243, 156, 18, 0.4));
}

.item-info {
    flex: 1;
}

.item-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #ecf0f1;
    margin-bottom: 5px;
}

.item-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #95a5a6;
}

.item-unit,
.item-price {
    display: flex;
    align-items: center;
    gap: 5px;
}

.item-price {
    font-weight: 600;
    color: #f39c12;
}

.item-inputs {
    display: none;
    background: rgba(52, 73, 94, 0.5);
    padding: 20px;
    border-radius: 6px;
    margin-top: 15px;
    border: 1px solid #4a5f7f;
    animation: expandInputs 0.4s ease-out;
    position: relative;
    z-index: 3;
}

@keyframes expandInputs {
    from {
        opacity: 0;
        transform: scaleY(0.8);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: scaleY(1);
        max-height: 500px;
    }
}

.item-row.selected .item-inputs {
    display: block;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.input-field label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.input-field label {
    color: #ecf0f1;
    font-size: 0.9rem;
}

.input-field input {
    width: 100%;
    padding: 12px;
    border: 1px solid #4a5f7f;
    border-radius: 6px;
    font-size: 1rem;
    background: #3d4d5d;
    color: #ecf0f1;
    position: relative;
    z-index: 5;
}

.input-field input:focus {
    outline: none;
    border-color: #f39c12;
    background: #4a5f7f;
}

.input-field input.error {
    border-color: var(--danger-color);
}

.input-field input::placeholder {
    color: #7f8c8d;
}

.item-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
    background: #3d4d5d;
    border-radius: 6px;
    border: 1px solid #f39c12;
    box-shadow: none;
}

.result-item {
    display: flex;
    flex-direction: column;
}

.result-label {
    font-size: 0.85rem;
    color: #95a5a6;
    margin-bottom: 5px;
}

.result-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ecf0f1;
    letter-spacing: 0.3px;
}

.result-value.highlight {
    color: #f39c12;
    font-size: 1.4rem;
    font-weight: 800;
    text-shadow: none;
}

.required-fields {
    margin-top: 10px;
    padding: 10px 15px;
    background: rgba(243, 156, 18, 0.1);
    border-left: 3px solid #f39c12;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #95a5a6;
}

.required-fields strong {
    color: #f39c12;
}

/* ==================
   SUMMARY SECTION
   ================== */

.category-totals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.category-total {
    background: #34495e;
    padding: 18px 20px;
    border-radius: 6px;
    border-left: 4px solid #f39c12;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.category-total::before {
    content: '📋';
    position: absolute;
    right: 10px;
    bottom: -5px;
    font-size: 50px;
    opacity: 0.05;
    pointer-events: none;
    transition: all 0.4s ease;
}

.category-total:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-md);
    border-left-width: 6px;
    border-left-color: #e67e22;
    background: linear-gradient(135deg, #3d4d5d, #34495e);
}

.category-total:hover::before {
    opacity: 0.08;
    transform: rotate(-10deg) scale(1.1);
    bottom: -10px;
}

.category-total-label {
    font-size: 0.9rem;
    color: #95a5a6;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-total-amount {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ecf0f1;
    letter-spacing: 0.5px;
}

.grand-total {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 30px 40px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    border: 2px solid #f39c12;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.grand-total:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6), 0 0 30px rgba(243, 156, 18, 0.3);
}

.grand-total::before {
    content: '💰';
    position: absolute;
    font-size: 100px;
    opacity: 0.05;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translateY(-50%) scale(1); opacity: 0.05; }
    50% { transform: translateY(-50%) scale(1.1); opacity: 0.08; }
}

.total-label {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #f39c12;
    text-shadow: none;
    position: relative;
    z-index: 1;
}

.total-amount {
    font-size: 2.2rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: none;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

/* ==================
   BUTTONS
   ================== */

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.btn {
    padding: 14px 32px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn:hover::before {
    width: 350px;
    height: 350px;
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

.btn-primary {
    background: #f39c12;
    color: #2c3e50;
    border-color: #f39c12;
    position: relative;
    z-index: 1;
}

.btn-primary:hover {
    background: #e67e22;
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

.btn-secondary {
    background: #34495e;
    color: #ecf0f1;
    border-color: #4a5f7f;
}

.btn-secondary:hover {
    background: #4a5f7f;
    border-color: #5a7095;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ==================
   VALIDATION SUMMARY
   ================== */

.validation-summary {
    background: rgba(231, 76, 60, 0.1);
    border: 2px solid #e74c3c;
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
}

.validation-summary.hidden {
    display: none;
}

.validation-summary h3 {
    color: #e74c3c;
    margin-bottom: 10px;
}

.validation-summary ul {
    list-style: none;
    padding-left: 0;
}

.validation-summary li {
    padding: 8px 0;
    color: #ecf0f1;
    font-weight: 500;
}

.validation-summary li::before {
    content: "❌ ";
    margin-right: 8px;
}

/* ==================
   FOOTER
   ================== */

.page-footer {
    text-align: center;
    padding: 25px;
    color: #95a5a6;
    font-size: 0.9rem;
    background: #2c3e50;
    border-radius: 0;
    margin-top: 30px;
    box-shadow: none;
    border-top: 2px solid #f39c12;
    position: relative;
    overflow: hidden;
}

.page-footer::before {
    content: '🏡 ✨ 🎨';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    opacity: 0.15;
    letter-spacing: 30px;
}

.page-footer p {
    font-weight: 500;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

/* ==================
   PRINT STYLES
   ================== */

/* ==================
   PROFESSIONAL PRINT STYLES - 2 PAGE PDF
   ================== */

@media print {
    @page {
        size: A4;
        margin: 0;
    }

    body {
        background: white !important;
        color: #000 !important;
        font-size: 11pt;
        line-height: 1.4;
        margin: 0;
        padding: 0;
    }

    .container {
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    /* Hide on-screen only elements */
    .action-buttons,
    .page-footer,
    .language-toggle,
    .item-checkbox,
    .validation-summary,
    .no-print,
    .user-info-bar,
    .save-prices-section,
    .announcements-section,
    button,
    a[href*="logout"],
    a[href*="announcements"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    
    /* Specifically hide navigation and management elements */
    div[style*="position: fixed"],
    div[style*="top: 20px"],
    nav,
    .btn,
    .btn-primary,
    .btn-secondary {
        display: none !important;
        visibility: hidden !important;
    }

    /* ==================
       PAGE 1: HEADER & SITE INFO
       ================== */

    .page-header {
        background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%) !important;
        color: white !important;
        padding: 15mm;
        margin: 0;
        border-bottom: 3mm solid #f39c12 !important;
        page-break-after: avoid;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .header-content {
        display: flex;
        align-items: center;
        gap: 15mm;
    }

    .header-logo {
        background: white !important;
        padding: 6mm;
        border-radius: 4mm;
        box-shadow: none;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .header-logo img {
        height: 22mm;
        width: auto;
        display: block;
        background: white !important;
    }

    .header-text {
        flex: 1;
    }

    .page-header h1 {
        font-size: 22pt;
        color: #f39c12 !important;
        margin-bottom: 3mm;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .subtitle {
        font-size: 11pt;
        color: #ecf0f1 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Site Information Section - Page 1 */
    .header-fields {
        background: white !important;
        border: none !important;
        border-radius: 0;
        padding: 10mm 15mm;
        margin: 0;
        page-break-after: always;
        page-break-inside: avoid;
    }

    .header-fields h2 {
        color: #2c3e50 !important;
        font-size: 16pt;
        border-bottom: 2pt solid #f39c12 !important;
        padding-bottom: 3mm;
        margin-bottom: 8mm;
        margin-top: 0;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .field-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6mm;
        margin-bottom: 0;
    }

    .field-group {
        margin-bottom: 5mm;
    }

    .field-group.full-width {
        grid-column: 1 / -1;
    }

    .field-group label {
        font-weight: bold;
        color: #2c3e50 !important;
        font-size: 10pt;
        display: block;
        margin-bottom: 2mm;
    }

    .field-group input,
    .field-group textarea {
        width: 100%;
        padding: 3mm 4mm;
        border: 1pt solid #95a5a6 !important;
        border-radius: 2mm;
        background: #f8f9fa !important;
        color: #000 !important;
        font-size: 11pt;
        font-weight: 600;
    }

    .help-text,
    .required,
    .conditional-required {
        display: none;
    }

    /* ==================
       PAGE 2: SELECTED ITEMS & TOTALS
       ================== */

    /* Hide items section completely, only show selected items */
    .items-section {
        display: none !important;
    }

    /* Show summary section on page 2 */
    .summary-section {
        background: white !important;
        border: none !important;
        padding: 15mm !important;
        margin: 0 !important;
        page-break-before: always;
    }

    .summary-section h2 {
        display: none;
    }

    /* Create selected items table for page 2 */
    .summary-section::before {
        content: "Selected Items & Pricing Details";
        display: block;
        font-size: 18pt;
        font-weight: bold;
        color: #2c3e50;
        border-bottom: 3pt solid #f39c12;
        padding-bottom: 4mm;
        margin-bottom: 8mm;
        margin-top: 0;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Category totals styling */
    .category-totals {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4mm;
        margin-bottom: 8mm;
        page-break-inside: avoid;
    }

    .category-total {
        background: #f8f9fa !important;
        border-left: 3mm solid #f39c12 !important;
        padding: 4mm;
        border-radius: 2mm;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .category-total-label {
        font-size: 9pt;
        color: #666 !important;
        text-transform: uppercase;
        margin-bottom: 2mm;
    }

    .category-total-amount {
        font-size: 14pt;
        font-weight: bold;
        color: #2c3e50 !important;
    }

    /* Grand Total */
    .grand-total {
        background: #2c3e50 !important;
        border: 2pt solid #f39c12 !important;
        padding: 10mm;
        border-radius: 3mm;
        margin: 10mm 0 8mm 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        page-break-inside: avoid;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .total-label {
        font-size: 18pt;
        font-weight: bold;
        color: #f39c12 !important;
        text-transform: uppercase;
        letter-spacing: 1.5pt;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .total-amount {
        font-size: 24pt;
        font-weight: bold;
        color: white !important;
        letter-spacing: 1pt;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Print footer */
    .summary-section::after {
        content: "© Bait Alamer - بيت العامر | Professional Quality Assurance";
        display: block;
        text-align: center;
        color: #95a5a6;
        font-size: 9pt;
        margin-top: 12mm;
        padding-top: 6mm;
        border-top: 1pt solid #f39c12;
    }

    /* Selected Items Table */
    .print-only {
        display: block !important;
    }

    .print-items-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 8mm;
        page-break-inside: auto;
    }

    .print-items-table thead {
        background: #2c3e50 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-items-table th {
        padding: 4mm 3mm;
        text-align: left;
        color: white !important;
        font-size: 10pt;
        font-weight: bold;
        border: 1pt solid #2c3e50 !important;
        text-transform: uppercase;
        letter-spacing: 0.3pt;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-items-table tbody tr {
        page-break-inside: avoid;
        border-bottom: 1pt solid #ddd;
    }

    .print-items-table tbody tr:nth-child(even) {
        background: #f8f9fa !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-items-table td {
        padding: 3mm 2mm;
        font-size: 9pt;
        color: #000 !important;
        border: 1pt solid #ddd !important;
    }

    .print-items-table .item-name-cell {
        font-weight: bold;
        color: #2c3e50 !important;
        max-width: 50mm;
    }

    .print-items-table .qty-cell {
        text-align: center;
        font-weight: bold;
        color: #2c3e50 !important;
    }

    .print-items-table .price-cell {
        text-align: right;
        color: #f39c12 !important;
        font-weight: 600;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Selling price - green color for pricing managers */
    .print-items-table .selling-price {
        color: #27ae60 !important;
        background: #eafaf1 !important;
    }
    
    /* Base price - orange color for pricing managers */
    .print-items-table .base-price {
        color: #e67e22 !important;
        background: #fef5e7 !important;
    }
    
    /* Selling total - green background */
    .print-items-table .selling-total {
        color: #27ae60 !important;
        background: #d4edda !important;
    }
    
    /* Base total - orange background */
    .print-items-table .base-total {
        color: #e67e22 !important;
        background: #fce5cd !important;
    }

    .print-items-table .total-cell {
        text-align: right;
        font-weight: bold;
        color: #2c3e50 !important;
        background: #fff9e6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Force color printing */
    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ==================
   RESPONSIVE
   ================== */

@media (max-width: 768px) {
    .page-header {
        padding: 25px 20px;
    }

    .header-content {
        flex-direction: column;
        gap: 20px;
    }

    .header-logo img {
        height: 80px;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .language-toggle {
        top: 10px;
        right: 15px;
    }

    .language-toggle button {
        padding: 8px 15px;
        font-size: 0.8rem;
    }

    .field-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 25px 15px;
    }

    section h2 {
        font-size: 1.4rem;
    }

    .grand-total {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 25px 20px;
    }

    .total-label {
        font-size: 1.3rem;
    }

    .total-amount {
        font-size: 1.8rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* ==================
   UTILITIES
   ================== */

.hidden {
    display: none !important;
}

.print-only {
    display: none;
}

/* ==================
   NAVY + SUNNY POLISH
   ================== */

:root {
    --primary-color: #0b2140;
    --primary-hover: #123a65;
    --secondary-color: #173b63;
    --accent-gold: #f6b932;
    --accent-gold-hover: #e9a917;
    --background: #07182f;
    --card-background: #102b4a;
    --card-hover: #173b63;
    --table-bg: #123a65;
    --table-row: #173b63;
    --border-color: rgba(214, 229, 245, 0.16);
    --border-accent: #f6b932;
    --text-primary: #f5f9ff;
    --text-secondary: #b8c6d8;
    --text-gold: #f6b932;
    --gradient-dark: linear-gradient(135deg, #0b2140 0%, #123a65 100%);
    --gradient-gold: linear-gradient(135deg, #ffd86b 0%, #f6b932 55%, #e9a917 100%);
}

body {
    background:
        radial-gradient(circle at top right, rgba(246, 185, 50, 0.16), transparent 34rem),
        linear-gradient(145deg, #06152a 0%, #0b2140 48%, #0f3156 100%);
}

.page-header,
section,
.category,
.summary-section,
.header-fields {
    border-radius: 14px;
}

.page-header {
    background: linear-gradient(135deg, rgba(11, 33, 64, 0.98), rgba(18, 58, 101, 0.96));
    border: 1px solid rgba(246, 185, 50, 0.24);
    border-bottom: 4px solid #f6b932;
}

section {
    background: rgba(16, 43, 74, 0.88);
    border: 1px solid rgba(214, 229, 245, 0.14);
    backdrop-filter: blur(8px);
}

section:hover {
    transform: translateY(-2px);
    border-color: rgba(246, 185, 50, 0.58);
}

.field-group input,
.field-group textarea {
    background: rgba(7, 24, 47, 0.72);
    border: 1px solid rgba(214, 229, 245, 0.18);
    color: #f5f9ff;
}

.field-group input:focus,
.field-group textarea:focus {
    background: rgba(11, 33, 64, 0.92);
    border-color: #f6b932;
    box-shadow: 0 0 0 4px rgba(246, 185, 50, 0.14);
}

.btn,
.language-toggle button {
    border-radius: 10px;
}

.btn-primary,
.user-info-bar .role-badge,
.language-toggle button:hover {
    background: var(--gradient-gold);
    color: #0b2140;
}

.btn-secondary {
    background: linear-gradient(135deg, #173b63, #0b2140);
    border: 1px solid rgba(246, 185, 50, 0.26);
}

.qr-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), #f8fbff);
    border: 1px solid rgba(246, 185, 50, 0.52);
    box-shadow: 0 22px 60px rgba(3, 12, 24, 0.28);
}

.whatsapp-btn {
    display: inline-block;
    margin-top: 14px;
    text-decoration: none;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #ffffff;
}

@media print {
    .print-portal-qr {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8mm;
        border: 2pt solid #f6b932;
        background: #fffbeb !important;
        border-radius: 3mm;
        padding: 6mm;
        margin: 8mm 0;
        page-break-inside: avoid;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-portal-qr h3 {
        margin: 0 0 2mm;
        color: #0b2140 !important;
        font-size: 15pt;
    }

    .print-portal-qr p {
        margin: 0 0 2mm;
        color: #34495e !important;
        font-size: 10pt;
    }

    .print-portal-qr .portal-url {
        overflow-wrap: anywhere;
        font-size: 8pt;
        color: #0b5cad !important;
    }

    .print-portal-qr img {
        width: 32mm;
        height: 32mm;
        background: white !important;
        border: 1pt solid #e5e7eb;
        border-radius: 2mm;
        padding: 2mm;
    }
}

.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mt-20 {
    margin-top: 20px;
}

