/* ==========================================================================
   Dinoyo Camera - Skeuomorphic Components Architecture
   Tactile Camera Equipment Trays, Flight-Case Modals, Optical Viewfinders,
   JCII Inspection Invoices, Tally Lamp Toasts & Comms Rotary Dials
   ========================================================================== */

/* ==========================================================================
   Backdrop & Darkroom Optical Overlay
   ========================================================================== */
.drawer-backdrop, .modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(10, 10, 14, 0.72) 0%, rgba(2, 2, 4, 0.88) 100%);
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.drawer-backdrop.active, .modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Offcanvas Drawers (Cart & Wishlist Equipment Trays)
   Styled as Sliding Machined Titanium/Magnesium Gear Trays with Knurled Pulls
   ========================================================================== */
.drawer {
    position: fixed;
    top: 0;
    right: -480px;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: var(--metal-plate);
    border-left: 1px solid var(--border-color);
    box-shadow: -15px 0 35px rgba(0, 0, 0, 0.65), 
                inset 1px 0 0 var(--metal-highlight),
                inset -1px 0 0 rgba(0, 0, 0, 0.4);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transition: right var(--transition-normal) cubic-bezier(0.16, 1, 0.3, 1),
                left var(--transition-normal) cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.35) 0px,
        rgba(0, 0, 0, 0.35) 2px,
        rgba(255, 255, 255, 0.08) 2px,
        rgba(255, 255, 255, 0.08) 4px
    );
    border-right: 1px solid rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 2;
}

.drawer.active {
    right: 0;
}

.drawer.drawer-left {
    right: auto;
    left: -480px;
    border-left: none;
    border-right: 1px solid var(--border-color);
    box-shadow: 15px 0 35px rgba(0, 0, 0, 0.65),
                inset -1px 0 0 var(--metal-highlight),
                inset 1px 0 0 rgba(0, 0, 0, 0.4);
}

.drawer.drawer-left::before {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 1px solid rgba(0, 0, 0, 0.5);
}

.drawer.drawer-left.active {
    left: 0;
}

/* Drawer Header: Precision Machined Top Cap with Screw Rivets */
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 18px 26px;
    background: var(--metal-header);
    border-bottom: 1px solid var(--border-color);
    box-shadow: inset 0 1px 0 var(--metal-highlight),
                0 4px 12px rgba(0, 0, 0, 0.35);
    position: relative;
    z-index: 5;
}

.drawer-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(225, 93, 81, 0.4), transparent);
    pointer-events: none;
}

.drawer-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.drawer-title-wrap h3 {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Tactile Rotary/Screw Release Close Button */
.drawer-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--metal-plate);
    border: 1px solid var(--border-color);
    box-shadow: var(--btn-raised-shadow),
                inset 0 1px 0 var(--metal-highlight);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.drawer-close-btn::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

.drawer-close-btn:hover {
    color: var(--danger);
    border-color: rgba(225, 93, 81, 0.6);
    box-shadow: 0 3px 10px rgba(225, 93, 81, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: rotate(90deg) scale(1.05);
}

.drawer-close-btn:active {
    box-shadow: var(--btn-pressed-shadow);
    transform: rotate(90deg) translateY(1px);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--leatherette-grain), var(--bg-surface);
    background-size: var(--leatherette-size);
}

/* ==========================================================================
   Cart Item Card: Recessed Equipment Dock Wells
   ========================================================================== */
.cart-item {
    display: flex;
    gap: 14px;
    background: var(--metal-plate);
    border: 1px solid var(--border-color);
    padding: 14px;
    border-radius: var(--radius-md);
    position: relative;
    box-shadow: var(--slot-inset-shadow),
                0 1px 0 var(--metal-highlight);
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.cart-item:hover {
    border-color: rgba(225, 93, 81, 0.35);
}

/* Chamfered Optical Mount Bezel for Thumbnail */
.cart-item-img {
    width: 76px;
    height: 76px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: #000;
    flex-shrink: 0;
    border: 2px solid #1a1a20;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.9),
                0 0 0 1px rgba(255, 255, 255, 0.08),
                0 3px 8px rgba(0, 0, 0, 0.4);
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cart-item-title {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 4px;
    color: var(--text-primary);
}

/* Digital Price Readout */
.cart-item-price {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-mono);
    text-shadow: 0 0 8px rgba(225, 93, 81, 0.25);
    margin-bottom: 8px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

/* Tactile Mechanical Stepper (Rocker EV Buttons) */
.qty-stepper {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--slot-inset-shadow);
    padding: 2px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    background: var(--metal-plate);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    box-shadow: var(--btn-raised-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.qty-btn:hover {
    background: var(--btn-shutter-red);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(225, 93, 81, 0.4);
}

.qty-btn:active {
    box-shadow: var(--btn-pressed-shadow);
    transform: translateY(1px);
}

.qty-number {
    width: 34px;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.btn-remove-item {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.btn-remove-item:hover {
    color: var(--danger);
    background: rgba(225, 93, 81, 0.1);
}

/* ==========================================================================
   Voucher Section in Cart: Stamped Metal Voucher Well
   ========================================================================== */
.voucher-section {
    background: var(--metal-plate);
    border: 1px dashed rgba(225, 93, 81, 0.4);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.4),
                0 1px 0 var(--metal-highlight);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-top: 10px;
    position: relative;
}

.voucher-form {
    display: flex;
    gap: 8px;
}

.voucher-input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    box-shadow: var(--slot-inset-shadow);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    text-transform: uppercase;
    font-family: var(--font-mono);
    color: var(--text-primary);
    letter-spacing: 0.05em;
}

.voucher-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--slot-inset-shadow), 0 0 0 2px rgba(225, 93, 81, 0.25);
}

.voucher-badge-applied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(145deg, rgba(225, 93, 81, 0.18), rgba(225, 93, 81, 0.08));
    border: 1px solid var(--primary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15),
                0 2px 6px rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-accent);
}

/* Drawer Footer: Machined Chassis Bottom Plate with Stamped Telemetry */
.drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--metal-header);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.45),
                inset 0 1px 0 var(--metal-highlight);
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 5;
}

.bill-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.bill-row.total {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    padding: 10px 12px;
    margin: 4px 0;
    background: var(--lcd-bg);
    border: 1px solid var(--lcd-border);
    box-shadow: var(--slot-inset-shadow),
                inset 0 0 10px rgba(0, 0, 0, 0.85);
    border-radius: var(--radius-sm);
    align-items: center;
}

.bill-row.total span:first-child {
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--lcd-subtext);
}

.bill-row.total span:last-child {
    color: var(--lcd-text);
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 900;
    text-shadow: 0 0 10px rgba(225, 93, 81, 0.45);
}

/* ==========================================================================
   Modals (Flight-Case Chassis & Camera Gear Vault)
   ========================================================================== */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -46%) scale(0.96);
    width: 90%;
    max-width: 860px;
    max-height: 90vh;
    background: var(--metal-plate);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85),
                0 0 0 1px rgba(255, 255, 255, 0.08),
                inset 0 1px 0 var(--metal-highlight);
    z-index: 1000;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal) cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Modal Beveled Header Plate with Torx Fastener Pins */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--metal-header);
    box-shadow: inset 0 1px 0 var(--metal-highlight),
                0 3px 12px rgba(0, 0, 0, 0.35);
    z-index: 10;
}

.modal-header::before,
.modal-header::after {
    content: '+';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 900;
    color: var(--text-muted);
    opacity: 0.4;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.modal-header::before { left: 10px; }
.modal-header::after { right: 10px; }

.modal-body {
    padding: 28px;
    background: var(--leatherette-grain), var(--bg-surface);
    background-size: var(--leatherette-size);
}

/* ==========================================================================
   Quick View Layout: Optical Viewfinder & 35mm Slide Frames
   ========================================================================== */
.quickview-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 32px;
}

/* Main Viewfinder Frame with Lens Anti-Reflective Multicoating */
.qv-gallery-main {
    height: 330px;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 12px;
    border: 2px solid #22222a;
    box-shadow: var(--slot-inset-shadow),
                0 0 0 1px rgba(255, 255, 255, 0.08),
                0 8px 24px rgba(0, 0, 0, 0.6);
    position: relative;
}

.qv-gallery-main::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--lens-coating-sheen);
    pointer-events: none;
    z-index: 2;
    opacity: 0.65;
}

/* Viewfinder Target HUD */
.qv-gallery-main::after {
    content: 'REC [ · ] 4K RAW';
    position: absolute;
    top: 12px;
    left: 14px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.55);
    padding: 3px 8px;
    border-radius: 3px;
    letter-spacing: 0.08em;
    pointer-events: none;
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.qv-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 35mm Slide Film Thumbnail Strip */
.qv-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px;
}

.qv-thumb {
    width: 62px;
    height: 62px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 2px solid var(--border-color);
    box-shadow: var(--btn-raised-shadow);
    cursor: pointer;
    background: #000;
    transition: all var(--transition-fast);
    filter: brightness(0.85);
}

.qv-thumb:hover {
    filter: brightness(1);
    border-color: rgba(225, 93, 81, 0.6);
    transform: translateY(-2px);
}

.qv-thumb.active {
    filter: brightness(1.05);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(225, 93, 81, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.qv-title {
    font-size: 1.55rem;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.25;
}

/* Optical Bench Spec Table */
.spec-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 16px 0;
    font-size: 0.86rem;
    background: var(--metal-plate);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--plate-raised-shadow);
}

.spec-table tr {
    border-bottom: 1px solid var(--border-color);
}

.spec-table tr:last-child {
    border-bottom: none;
}

.spec-table tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.15);
}

.spec-table td {
    padding: 10px 12px;
}

.spec-table td:first-child {
    color: var(--text-muted);
    width: 40%;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    border-right: 1px solid var(--border-color);
}

.spec-table td:last-child {
    color: var(--text-primary);
    font-weight: 600;
    font-family: var(--font-mono);
}

.package-includes-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.86rem;
    margin: 14px 0 22px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--slot-inset-shadow);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
}

.package-includes-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

.package-includes-list li::before {
    content: '●';
    color: var(--accent);
    font-size: 0.75rem;
    text-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

/* ==========================================================================
   Checkout Modal & Form (Tactile Rotary Mode Selectors)
   ========================================================================== */
.checkout-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 32px;
}

.checkout-section-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Tactile Radio Selector Plates */
.courier-option-card, .payment-option-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--metal-plate);
    border: 1px solid var(--border-color);
    padding: 13px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-bottom: 10px;
    box-shadow: var(--btn-raised-shadow),
                inset 0 1px 0 var(--metal-highlight);
    transition: all var(--transition-fast);
    position: relative;
    user-select: none;
}

.courier-option-card::before, .payment-option-card::before {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.courier-option-card:hover, .payment-option-card:hover {
    border-color: rgba(225, 93, 81, 0.45);
    transform: translateY(-1px);
}

/* Selected State: Physical Depressed Detent & Illuminated Ring */
.courier-option-card.selected, .payment-option-card.selected {
    border-color: var(--primary);
    background: linear-gradient(145deg, rgba(225, 93, 81, 0.16), rgba(225, 93, 81, 0.05));
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.4),
                0 0 12px rgba(225, 93, 81, 0.2);
}

.courier-option-card.selected::before, .payment-option-card.selected::before {
    background: var(--primary);
    border-color: #ffffff;
    box-shadow: 0 0 8px var(--primary),
                inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.courier-info, .payment-info {
    flex: 1;
}

.courier-name, .payment-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

.courier-desc, .payment-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.courier-price {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-mono);
}

/* Checkout Telemetry Summary Box */
.checkout-summary-box {
    background: var(--metal-plate);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px;
    box-shadow: var(--plate-raised-shadow),
                inset 0 1px 0 var(--metal-highlight);
}

.order-items-scroll {
    max-height: 220px;
    overflow-y: auto;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--slot-inset-shadow);
    padding: 12px;
    border-radius: var(--radius-sm);
}

.mini-order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--border-color);
}

.mini-order-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* ==========================================================================
   Digital Invoice Modal: Authentic Japanese Camera Inspection Certificate
   Parchment Texture, Debossed Security Rim & Gold Foil Stamped Seal
   ========================================================================== */
.invoice-container {
    background: #fdfcfa;
    color: #1a1a24;
    padding: 38px 42px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4),
                inset 0 0 0 2px #d4c5b9,
                inset 0 0 0 6px #fdfcfa,
                inset 0 0 0 8px #d4c5b9;
}

/* Perforated Receipt Top/Bottom Edges */
.invoice-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        #b8a495 0px,
        #b8a495 6px,
        transparent 6px,
        transparent 12px
    );
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 22px;
    border-bottom: 2px solid #2a2a35;
    margin-bottom: 24px;
    position: relative;
}

.invoice-brand h2 {
    color: #0f141e;
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.invoice-brand p {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
}

.invoice-number-badge {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #334155;
}

/* Gold Foil Stamped Warranty Inspection Seal */
.invoice-status-paid {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fef08a 0%, #facc15 50%, #ca8a04 100%);
    color: #713f12;
    font-weight: 900;
    padding: 5px 14px;
    border-radius: 4px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 8px;
    box-shadow: 0 2px 6px rgba(202, 138, 4, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.6),
                inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    border: 1px solid #a16207;
}

.invoice-status-paid::before {
    content: '★';
    color: #854d0e;
}

.invoice-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 26px;
    font-size: 0.88rem;
    background: #f8f6f0;
    border: 1px solid #e7e2d6;
    padding: 16px 20px;
    border-radius: 6px;
}

.invoice-meta-grid strong {
    color: #0f172a;
    display: block;
    margin-bottom: 4px;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.invoice-table th {
    background: #242933;
    color: #f8fafc;
    text-align: left;
    padding: 11px 14px;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid #1e293b;
}

.invoice-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    border-left: 1px solid #f1f5f9;
    border-right: 1px solid #f1f5f9;
    font-size: 0.88rem;
    color: #1e293b;
}

.invoice-table tr:nth-child(even) td {
    background: #fbfbfa;
}

.invoice-total-section {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.invoice-total-box {
    width: 300px;
    background: #f8f6f0;
    border: 1px solid #e2ddd3;
    border-radius: 6px;
    padding: 14px 18px;
}

.invoice-total-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 0.9rem;
    color: #475569;
}

.invoice-grand-total {
    font-size: 1.25rem;
    font-weight: 900;
    color: #0f172a;
    font-family: var(--font-mono);
    border-top: 2px dashed #94a3b8;
    padding-top: 10px;
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
}

.invoice-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
}

/* Print View Formatting */
@media print {
    body * {
        visibility: hidden;
    }
    .invoice-container, .invoice-container * {
        visibility: visible;
    }
    .invoice-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 24px;
        box-shadow: none;
        border: 2px solid #000;
    }
    .invoice-actions, .modal-header {
        display: none !important;
    }
}

/* ==========================================================================
   Toast Notifications: Machined Tally Lamp Modules
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
    pointer-events: none;
}

.toast-item {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--metal-header);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.75),
                inset 0 1px 0 var(--metal-highlight);
    font-size: 0.92rem;
    font-weight: 700;
    animation: slideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 400px;
    position: relative;
    overflow: hidden;
}

/* Jewel Convex Tally Lamp Bezel */
.toast-item::before {
    content: '';
    width: 8px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
}

.toast-success::before {
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
}

.toast-error::before {
    background: var(--danger);
    box-shadow: 0 0 12px var(--danger);
}

.toast-info::before {
    background: var(--secondary);
    box-shadow: 0 0 12px var(--secondary);
}

.toast-icon {
    display: flex;
    align-items: center;
    color: var(--primary);
    font-size: 1.25rem;
    filter: drop-shadow(0 0 6px currentColor);
}

.toast-success .toast-icon { color: var(--accent); }
.toast-error .toast-icon { color: var(--danger); }

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    line-height: 1;
    margin-left: auto;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: #ffffff;
}

.toast-fade-out {
    animation: fadeOutRight 0.3s forwards cubic-bezier(0.7, 0, 0.84, 0);
}

@keyframes slideInRight {
    from { transform: translateX(110%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(110%); opacity: 0; }
}

/* ==========================================================================
   Floating WhatsApp Button: Tactical Radio Transmitter Rotary Dial
   ========================================================================== */
.floating-whatsapp-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 990;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px 10px 12px;
    border-radius: 9999px;
    background: linear-gradient(145deg, #2ddc70 0%, #179b5b 60%, #0e6c3e 100%);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #ffffff !important;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5),
                0 4px 14px rgba(37, 211, 102, 0.45),
                inset 0 2px 2px rgba(255, 255, 255, 0.7),
                inset 0 -2px 4px rgba(0, 0, 0, 0.35);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.floating-whatsapp-btn:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6),
                0 8px 20px rgba(37, 211, 102, 0.6),
                inset 0 2px 3px rgba(255, 255, 255, 0.85);
    color: #ffffff !important;
}

.floating-whatsapp-btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6),
                inset 0 3px 6px rgba(0, 0, 0, 0.45);
}

.floating-wa-icon-wrap {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.45), rgba(0, 0, 0, 0.15));
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35),
                inset 0 1px 1px rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.floating-whatsapp-btn:hover .floating-wa-icon-wrap {
    transform: rotate(12deg) scale(1.08);
}

.floating-wa-icon-wrap svg {
    width: 22px;
    height: 22px;
    fill: #ffffff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.floating-wa-pulse {
    position: absolute;
    inset: -6px;
    border-radius: 9999px;
    background: rgba(37, 211, 102, 0.4);
    z-index: -1;
    animation: waPulseRing 2.2s cubic-bezier(0.25, 0, 0.2, 1) infinite;
    pointer-events: none;
}

@keyframes waPulseRing {
    0% {
        transform: scale(0.95);
        opacity: 0.85;
    }
    70% {
        transform: scale(1.15, 1.35);
        opacity: 0;
    }
    100% {
        transform: scale(1.2, 1.4);
        opacity: 0;
    }
}

.floating-wa-text {
    white-space: nowrap;
    letter-spacing: 0.02em;
    padding-right: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
