:root {
    --primary-orange: #f97316;
    --dark-orange: #ea580c;
    --light-bg: #fff7ed;
    --text-color: #333;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

h1,
h2,
h3 {
    color: var(--dark-orange);
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.btn {
    background-color: var(--primary-orange);
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1rem;
    margin-top: 10px;
    text-decoration: none;
    display: inline-block;
}

.btn:hover:not(:disabled) {
    background-color: var(--dark-orange);
}

.btn:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
    opacity: 0.7;
}

.receipt-box {
    border: 2px dashed var(--primary-orange);
    padding: 20px;
    background: #fffaf0;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table,
th,
td {
    border: 1px solid #ddd;
}

th,
td {
    padding: 12px;
    text-align: left;
}

th {
    background-color: var(--primary-orange);
    color: white;
}

@media print {
    body * {
        visibility: hidden;
    }

    .receipt-box,
    .receipt-box * {
        visibility: visible;
    }

    .receipt-box {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        border: none;
    }

    .no-print {
        display: none;
    }
}

/* Shared Form Styles for all operation pages */
.inline-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 25px;
}

.inline-row label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.inline-row input,
.inline-row select {
    height: 42px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.inline-row .btn-inline {
    height: 42px;
    margin: 0;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    white-space: nowrap;
    cursor: pointer;
}

.status-msg {
    font-weight: bold;
    font-size: 0.95rem;
    margin-top: 10px;
    display: block;
}

/* Page Specific Form Backgrounds */
.form-box {
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
}

.bg-yellow {
    background-color: #fffde7;
    border-color: #fff59d;
}

/* New Card */
.bg-blue {
    background-color: #f0f8ff;
    border-color: #90caf9;
}

/* Balance Check */
.bg-green {
    background-color: #e8f5e9;
    border-color: #4caf50;
}

.bg-red {
    background-color: #ffebee;
    border-color: #ef9a9a;
}

/* Deduct Credit */


/* Form Layout Utilities */
.flex-1 {
    flex: 1;
}

.flex-2 {
    flex: 2;
}

.flex-3 {
    flex: 3;
}

.min-w-100 {
    min-width: 100px;
}

.min-w-120 {
    min-width: 120px;
}

.min-w-140 {
    min-width: 140px;
}

.min-w-150 {
    min-width: 150px;
}

.min-w-160 {
    min-width: 160px;
}

.min-w-180 {
    min-width: 180px;
}

.min-w-200 {
    min-width: 200px;
}

.min-w-220 {
    min-width: 220px;
}

.min-w-260 {
    min-width: 260px;
}

.w-120 {
    width: 120px;
}

.w-200 {
    width: 200px;
}

.w-100 {
    width: 100%;
}

.h-42 {
    height: 42px;
}

/* Text & Input Utilities */
.text-center {
    text-align: center;
}

.ls-2 {
    letter-spacing: 2px;
}

/* Status Message Utilities */
.status-wrapper {
    position: relative;
    min-height: 21px;
    margin-bottom: 5px;
}

.status-absolute {
    position: absolute;
    right: 0;
    bottom: 0;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
}

/* Locked Field Utility (handles Chrome autofill light-blue background) */
.locked-field,
.locked-field:-webkit-autofill,
.locked-field:-webkit-autofill:hover,
.locked-field:-webkit-autofill:focus,
.locked-field:-webkit-autofill:active {
    background-color: #e9ecef !important;
    -webkit-box-shadow: 0 0 0px 1000px #e9ecef inset !important;
    color: #495057 !important;
    -webkit-text-fill-color: #495057 !important;
    cursor: not-allowed !important;
}

/* Tab Navigation Utilities */
.tabs-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    width: 100%;
}

.tab-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid #ef9a9a;
    border-radius: 6px;
    background: #ffffff;
    color: #c62828;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
}

.tab-btn:hover:not(.active) {
    background: #ffebee;
}

.tab-btn.active {
    background: #c62828;
    color: #ffffff;
    border-color: #b71c1c;
    box-shadow: 0 2px 4px rgba(198, 40, 40, 0.25);
}

@media (max-width: 600px) {
    .tabs-nav {
        flex-direction: column;
    }
}