/* ═══════════════════════════════════════════════════
   HTP-POS Modern UI Theme v1.0
   Professional, clean design — overrides Bootstrap/Argon
   Load AFTER app.css for full override effect
   ═══════════════════════════════════════════════════ */

/* ── Import Inter font ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Root Variables ── */
:root {
    --htp-blue: #2563eb;
    --htp-blue-dark: #1d4ed8;
    --htp-blue-light: #dbeafe;
    --htp-slate-50: #f8fafc;
    --htp-slate-100: #f1f5f9;
    --htp-slate-200: #e2e8f0;
    --htp-slate-300: #cbd5e1;
    --htp-slate-400: #94a3b8;
    --htp-slate-500: #64748b;
    --htp-slate-700: #334155;
    --htp-slate-900: #0f172a;
    --htp-emerald: #10b981;
    --htp-emerald-dark: #059669;
    --htp-red: #ef4444;
    --htp-amber: #f59e0b;
    --htp-sky: #0ea5e9;
    --htp-radius: 0.5rem;
    --htp-radius-lg: 0.75rem;
    --htp-shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.04);
    --htp-shadow: 0 1px 3px 0 rgba(0,0,0,0.06), 0 1px 2px -1px rgba(0,0,0,0.04);
    --htp-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
}

/* ── Typography ── */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--htp-slate-700);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--htp-slate-900);
}

/* ── Cards ── */
.card {
    border: 1px solid var(--htp-slate-200) !important;
    border-radius: var(--htp-radius-lg) !important;
    box-shadow: var(--htp-shadow) !important;
    transition: box-shadow 0.2s ease;
}
.card:hover {
    box-shadow: var(--htp-shadow-md) !important;
}
.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--htp-slate-100) !important;
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.9375rem;
}
.card-body {
    padding: 1.25rem;
}
.card-stats .numbers {
    font-size: 1.5rem;
    font-weight: 700;
}

/* ── Buttons ── */
.btn {
    font-weight: 500 !important;
    letter-spacing: -0.01em;
    border-radius: var(--htp-radius) !important;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}
.btn:focus, .btn:active {
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15) !important;
}
.btn-primary {
    background: var(--htp-blue) !important;
    border-color: var(--htp-blue) !important;
}
.btn-primary:hover {
    background: var(--htp-blue-dark) !important;
    border-color: var(--htp-blue-dark) !important;
}
.btn-success {
    background: var(--htp-emerald) !important;
    border-color: var(--htp-emerald) !important;
}
.btn-success:hover {
    background: var(--htp-emerald-dark) !important;
    border-color: var(--htp-emerald-dark) !important;
}
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}
.btn-lg {
    padding: 0.625rem 1.5rem;
    font-size: 1rem;
}
.btn-outline-primary {
    color: var(--htp-blue) !important;
    border-color: var(--htp-blue) !important;
}
.btn-outline-primary:hover {
    background: var(--htp-blue) !important;
    color: #fff !important;
}

/* ── Badges ── */
.badge {
    font-weight: 500;
    letter-spacing: -0.01em;
    padding: 0.25em 0.6em;
    border-radius: 0.375rem;
}
.badge-primary { background: var(--htp-blue-light); color: #1e40af; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info    { background: #e0f2fe; color: #075985; }

/* ── Form Controls ── */
.form-control {
    border: 1px solid var(--htp-slate-200) !important;
    border-radius: var(--htp-radius) !important;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus {
    border-color: #93c5fd !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1) !important;
}

/* ── Tables ── */
.table thead th {
    background: var(--htp-slate-50);
    border-bottom: 2px solid var(--htp-slate-200);
    color: var(--htp-slate-500);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem;
}
.table tbody td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--htp-slate-100);
    vertical-align: middle;
}
.table tbody tr:hover {
    background: var(--htp-slate-50);
}

/* ── Navbar / Top Navigation ── */
.navbar-top, .navbar-vertical.navbar-expand-md,
.navbar:not(.navbar-vertical) {
    background: #ffffff !important;
    border-bottom: 1px solid var(--htp-slate-200);
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.03);
}
.navbar .navbar-brand {
    font-weight: 700;
    color: var(--htp-slate-900);
}
.navbar .nav-link {
    color: var(--htp-slate-500);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: var(--htp-radius);
    transition: all 0.15s ease;
}
.navbar .nav-link:hover {
    color: var(--htp-slate-900);
    background: var(--htp-slate-100);
}
.navbar .nav-link.active {
    color: var(--htp-blue);
    background: #eff6ff;
}

/* ── Sidebar ── */
.sidenav, .navbar-vertical {
    background: var(--htp-slate-900) !important;
}
.sidenav .navbar-brand,
.navbar-vertical .navbar-brand {
    color: #ffffff !important;
}
.sidenav .nav-link,
.navbar-vertical .nav-link {
    color: var(--htp-slate-400) !important;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: var(--htp-radius);
    margin: 0.125rem 0.5rem;
    padding: 0.625rem 1rem;
    transition: all 0.15s ease;
}
.sidenav .nav-link:hover,
.navbar-vertical .nav-link:hover {
    color: #e2e8f0 !important;
    background: rgba(255,255,255,0.05);
}
.sidenav .nav-link.active,
.navbar-vertical .nav-link.active {
    color: #60a5fa !important;
    background: rgba(37,99,235,0.15) !important;
}
.sidenav .navbar-heading,
.navbar-vertical .navbar-heading {
    color: #475569 !important;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.75rem 1.25rem 0.5rem;
}

/* ── Dropdowns ── */
.dropdown-menu {
    border: 1px solid var(--htp-slate-200);
    border-radius: var(--htp-radius);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.04);
    padding: 0.375rem;
}
.dropdown-item {
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
}
.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--htp-slate-100);
    color: var(--htp-slate-900);
}

/* ── Modals ── */
.modal-content {
    border: none;
    border-radius: var(--htp-radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
}
.modal-header {
    border-bottom: 1px solid var(--htp-slate-100);
    padding: 1.25rem;
}
.modal-footer {
    border-top: 1px solid var(--htp-slate-100);
    padding: 1rem 1.25rem;
}

/* ── Alerts ── */
.alert {
    border: none;
    border-radius: var(--htp-radius);
    font-size: 0.875rem;
    padding: 0.875rem 1rem;
}

/* ── Progress Bars ── */
.progress {
    background: var(--htp-slate-100);
    border-radius: 9999px;
    height: 0.5rem;
}
.progress-bar {
    border-radius: 9999px;
}

/* ── Utility: Smooth transitions ── */
a, .btn, .card, .nav-link, .dropdown-item,
.form-control, .badge {
    transition: all 0.15s ease;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .card-body { padding: 1rem; }
    .table { font-size: 0.8125rem; }
    h1, .h1 { font-size: 1.5rem; }
    h2, .h2 { font-size: 1.25rem; }
}

/* ── Print-friendly ── */
@media print {
    .navbar, .sidenav, .btn, .no-print,
    .navbar-vertical, .navbar-top {
        display: none !important;
    }
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}
