/* Orders Form — BBC Admin Dark Theme */

/* Card & Invoice wrapper */
.card-warning { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.card-warning .card-body { padding: 20px; }
.invoice { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); }
.invoice h4 { font-size: 1rem; color: var(--text); margin-bottom: 16px; }
.invoice h4 small { font-size: 0.72rem; color: var(--text-muted); }

/* 3-column grid for invoice info */
.invoice-info { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; flex-wrap: unset; }
.invoice-col label { font-family: 'Montserrat', sans-serif; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--accent); margin-bottom: 8px; display: block; }
.invoice-col address { margin: 0; }

/* Info rows */
.invoice__info-inner { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.invoice__info-title { font-size: 0.72rem; color: var(--text-muted); min-width: 90px; flex-shrink: 0; }
.invoice__info-text { flex: 1; }
.invoice__info-inner-small { display: flex; align-items: center; gap: 4px; flex: 1; }
.invoice__info-inner-small .invoice__info-title { min-width: 50px; }

/* All inputs in form */
.form-control-small,
.zayavka input[type="text"],
.zayavka input[type="number"],
.zayavka select,
.invoice input[type="text"],
.invoice input[type="number"],
.invoice select {
    width: 100%;
    padding: 6px 10px;
    font-size: 0.78rem;
    color: var(--text);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.2s;
}
.zayavka input:focus, .zayavka select:focus,
.invoice input:focus, .invoice select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 2px rgba(0,255,255,0.1);
}
.zayavka input[disabled], .invoice input[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Product table */
#tab { width: 100%; border-collapse: collapse; margin-top: 12px; }
#tab thead th {
    padding: 8px 10px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    text-align: center;
}
#tab tbody td { padding: 4px 6px; border-bottom: 1px solid var(--border); vertical-align: middle; }
#tab tbody input.form-control {
    padding: 5px 8px; font-size: 0.75rem; background: var(--bg-input);
    border: 1px solid var(--border); color: var(--text); border-radius: 4px;
}
#tab tbody input.form-control:focus { border-color: var(--cyan); }

/* Delete row X */
.del_order_row {
    width: 24px; height: 24px; border-radius: 4px;
    background: rgba(231,76,60,0.15); color: var(--danger);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 0.7rem; font-weight: 600;
}
.del_order_row:hover { background: var(--danger); color: #fff; }

/* Price section */
.invoice address {
    display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px;
}
.invoice address label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.invoice address select, .invoice address input[type="text"] { width: 140px !important; }

/* Textarea */
textarea.form-control {
    width: 100%; padding: 10px; font-size: 0.8rem; color: var(--text);
    background: var(--bg-input); border: 1px solid var(--border); border-radius: 6px;
    resize: vertical; min-height: 60px; font-family: 'Poppins', sans-serif;
}
textarea.form-control:focus { border-color: var(--cyan); }

/* Totals */
.invoice .lead { font-size: 0.85rem; color: var(--text); }
.invoice .lead strong { color: var(--accent); }
#summ_total { color: var(--accent); }

/* Bottom buttons */
.btn-pale { padding: 8px 16px; font-size: 0.78rem; border-radius: 6px; margin-right: 6px; margin-bottom: 6px; }
.btn-warning.btn-pale { background: var(--accent); color: #000; border: none; }
.btn-success.btn-pale { background: var(--success); color: #fff; border: none; }
.btn-danger.btn-pale { background: var(--danger); color: #fff; border: none; }
.btn-info.btn-pale { background: var(--info); color: #fff; border: none; }

/* Row compat */
.col-3 { width: 25%; padding: 0 8px; }
.col-6 { width: 50%; padding: 0 8px; }
.col-12 { width: 100%; padding: 0 8px; }
.col-sm-4 { padding: 0; }
.invoice-info > .col-sm-4 { width: auto; }
.float-right { float: right; }
.p-3 { padding: 16px; }
.h100 { min-height: auto; }
.table-responsive { overflow-x: auto; }

/* Responsive */
@media (max-width: 992px) {
    .invoice-info { grid-template-columns: 1fr; }
    .col-sm-4, .col-3, .col-6 { width: 100%; }
}
