/* ============================================================
   STEP 14 — BASE STYLES (shared across all panels)
   Location: /files/public_html/inn/css/base.css
   ============================================================ */

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    --primary:       #0a2540;
    --accent:        #00b4d8;
    --accent-dark:   #0077b6;
    --dark:          #1a1a2e;
    --light:         #f8f9fa;
    --gray:          #6c757d;
    --border:        #e5e7eb;
    --success:       #10b981;
    --danger:        #ef4444;
    --warning:       #f59e0b;
    --info:          #0ea5e9;

    /* Veg / Non-veg markers (India-specific) */
    --veg:           #10b981;
    --nonveg:        #dc2626;
}

/* ============================================================
   RESET
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg, video {
    display: inline-block;
    vertical-align: middle;
    max-width: 100%;
}

/* ============================================================
   LINKS
   ============================================================ */
a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-dark);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    font-family: inherit;
    text-align: center;
    line-height: 1.3;
    -webkit-user-select: none;
    user-select: none;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover:not(:disabled) {
    background: var(--accent-dark);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
}
.btn-success:hover:not(:disabled) {
    background: #059669;
    color: #fff;
}

.btn-secondary {
    background: var(--gray);
    color: #fff;
}
.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
    color: #fff;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 9px 16px;
    font-size: 0.82rem;
    border-radius: 8px;
}

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   FORM INPUTS
   ============================================================ */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
    font-family: inherit;
    color: #333;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,180,216,0.12);
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

input:disabled,
select:disabled,
textarea:disabled {
    background: #f1f5f9;
    cursor: not-allowed;
    opacity: 0.7;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-danger  { background: #fee2e2; color: #991b1b; }

/* ============================================================
   VEG / NON-VEG MARKERS
   ============================================================ */
.veg-dot,
.nonveg-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1.5px solid currentColor;
    position: relative;
    flex-shrink: 0;
    vertical-align: middle;
}

.veg-dot {
    color: var(--veg);
}

.nonveg-dot {
    color: var(--nonveg);
}

.veg-dot::after,
.nonveg-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.veg-dot::after {
    background: var(--veg);
}

.nonveg-dot::after {
    background: var(--nonveg);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.hidden { display: none !important; }
.muted  { color: var(--gray); font-size: 0.88rem; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* ============================================================
   FORM GROUP (shared)
   ============================================================ */
.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group .form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 5px;
    line-height: 1.4;
    font-weight: 400;
}

/* ============================================================
   CARD (generic)
   ============================================================ */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 22px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 24px;
}

.card h3 {
    color: var(--primary);
    margin-bottom: 16px;
    font-size: 1.05rem;
    font-weight: 700;
}

/* ============================================================
   PAGE HEAD (shared across panels)
   ============================================================ */
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 14px;
}

.page-head h1 {
    font-size: 1.55rem;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* ============================================================
   DATA TABLE (shared)
   ============================================================ */
.table-wrap {
    background: #fff;
    border-radius: 12px;
    overflow-x: auto;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 22px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.data-table th,
.data-table td {
    padding: 13px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: #f8fafc;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover td {
    background: #fafbfc;
}

.data-table.compact th,
.data-table.compact td {
    padding: 8px 12px;
    font-size: 0.84rem;
}

.data-table tfoot th {
    background: #f8fafc;
    font-size: 0.92rem;
    font-weight: 700;
}

.row-muted td {
    opacity: 0.55;
}

/* ============================================================
   MODAL (base — panels override position)
   ============================================================ */
.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(10, 37, 64, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal {
    background: #fff;
    border-radius: 16px;
    padding: 26px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.35);
    animation: modalIn 0.2s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.modal h3 {
    color: var(--primary);
    font-size: 1.15rem;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--gray);
    padding: 6px;
    border-radius: 6px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 1.3rem;
    line-height: 1;
    font-family: inherit;
}

.modal-close:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 22px;
}

/* ============================================================
   TAB ROW (shared — orders filters)
   ============================================================ */
.tab-row {
    display: flex;
    gap: 8px;
    margin-bottom: 22px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.tab {
    padding: 8px 18px;
    background: #fff;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray);
    text-decoration: none;
    border: 1px solid var(--border);
    white-space: nowrap;
    transition: all 0.15s ease;
}

.tab:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
}

.tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ============================================================
   FORM ROW (grid form layout)
   ============================================================ */
.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr auto;
    gap: 12px;
    align-items: end;
}

.form-group-btn {
    display: flex;
    align-items: flex-end;
}

@media (max-width: 800px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 700px) {
    .page-head h1 {
        font-size: 1.3rem;
    }
    .container {
        padding: 0 16px;
    }
}