/*
 * Rubino Pro — polish on top of the owner's own styles (2026-11-16). Same colours, buttons, texts and places;
 * only: the Cairo font is served by us, small finishing touches, a phone layout (his had none), the login screen
 * and the "saved" pill. Remove this file and the program looks exactly like his original.
 */
@font-face { font-family: 'Cairo'; font-style: normal; font-weight: 200 1000; font-display: swap; src: url(vendor/cairo-arabic.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Cairo'; font-style: normal; font-weight: 200 1000; font-display: swap; src: url(vendor/cairo-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* While loading / signing in, hide his screens (no flash of empty numbers). */
html.pro-loading .app-container { visibility: hidden; }

/* ---------- finishing touches (desktop keeps his layout) ---------- */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
input, select, textarea { min-height: 44px; }
input[type="checkbox"], input[type="radio"] { min-height: 0; width: auto; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 3px solid rgba(212, 175, 55, 0.45); outline-offset: 1px; }
button { min-height: 40px; }
.btn-sm { min-height: 32px; }
.card { transition: box-shadow 0.2s; }
.card:hover { box-shadow: 0 10px 24px -12px rgba(15, 23, 42, 0.18); }
td, th { font-variant-numeric: tabular-nums; }
.table-container { background: #fff; }
.table-scroll { -webkit-overflow-scrolling: touch; }
.modal-content { overscroll-behavior: contain; }
.main-content { scroll-behavior: smooth; padding-top: 3.2rem; }

/* ---------- top bar: save state, user, links ---------- */
.pro-top { position: fixed; top: 10px; left: 14px; z-index: 1500; display: flex; align-items: center; gap: 10px; font-size: 0.8rem; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px); border: 1px solid #e2e8f0; border-radius: 999px; padding: 5px 8px 5px 14px; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08); }
.pro-top a { color: #1e1b4b; text-decoration: none; font-weight: 700; white-space: nowrap; }
.pro-top a:hover { color: #b8860b; }
.pro-user { color: #475569; font-weight: 700; }
.pro-pill { border-radius: 999px; padding: 3px 10px; background: #f1f5f9; color: #334155; font-weight: 700; white-space: nowrap; }
.pro-pill.ok { background: #dcfce7; color: #166534; }
.pro-pill.warn { background: #fef3c7; color: #92400e; white-space: normal; }
.pro-pill button { min-height: 0; padding: 2px 8px; font-size: 0.75rem; border-radius: 6px; background: #1e1b4b; color: #fff; margin-inline-start: 4px; }

/* ---------- toast (website orders added) ---------- */
.pro-toast { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 2500; background: #1e1b4b; color: #fff; padding: 10px 18px; border-radius: 12px; font-weight: 700; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.3); transition: opacity 0.5s, transform 0.5s; }
.pro-toast.out { opacity: 0; transform: translate(-50%, -10px); }

/* ---------- login ---------- */
.pro-login { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(160deg, #1e1b4b 0%, #0f172a 100%); }
.pro-login form { width: 100%; max-width: 380px; background: #fff; border-radius: 22px; padding: 32px 28px; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35); text-align: center; }
.pro-login-logo { font-size: 2.6rem; filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.55)); }
.pro-login h2 { margin: 6px 0 2px; font-size: 1.6rem; background: linear-gradient(135deg, #FDD835, #F57F17); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-weight: 800; }
.pro-login p { margin: 0 0 18px; color: #64748b; }
.pro-login label { text-align: right; }
.pro-login input { margin-top: 6px; margin-bottom: 12px; text-align: left; }
.pro-login button { width: 100%; background: linear-gradient(135deg, #FDD835, #F57F17); color: #1e1b4b; font-size: 1rem; margin-top: 4px; }
.pro-login button:disabled { opacity: 0.6; }
.pro-login small { display: block; margin-top: 12px; color: #94a3b8; }
.pro-login-err { min-height: 20px; color: #dc2626; font-weight: 700; font-size: 0.85rem; margin-bottom: 4px; }

/* ---------- phone / tablet: his program had no small-screen layout ---------- */
@media (max-width: 900px) {
  body { overflow: auto; font-size: 15px; }
  .app-container { flex-direction: column; height: auto; min-height: 100vh; }
  .sidebar { width: 100% !important; padding: 0.6rem 0.75rem; position: sticky; top: 0; flex-direction: column; gap: 6px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); }
  .brand-section { margin: 0; padding: 0 0 6px; border-bottom: 0; gap: 8px; }
  .brand-section .logo-icon { font-size: 1.5rem; }
  .brand-text h1 { font-size: 1.1rem; }
  .brand-text p { display: none; }
  .nav-menu { display: flex; overflow-x: auto; gap: 6px; flex: none; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav-menu::-webkit-scrollbar { display: none; }
  .nav-item { flex: none; }
  .nav-btn { width: auto; white-space: nowrap; padding: 9px 14px; gap: 6px; font-size: 0.85rem; }
  .nav-btn:hover { transform: none; }
  .sidebar > *:not(.brand-section):not(.nav-menu) { display: none; }
  .main-content { padding: 0.9rem 0.75rem 5rem; overflow: visible; }
  .card { padding: 1.1rem; border-radius: 14px; }
  .stats-grid, .kpi-grid, .report-grid, .gmroi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
  .stat-value { font-size: 1.5rem; }
  .kpi-value { font-size: 1.35rem; }
  .grid-forms { grid-template-columns: 1fr !important; }
  .charts-row { grid-template-columns: 1fr !important; }
  .chart-box { height: 280px; }
  .flex-between { flex-wrap: wrap; gap: 8px; }
  .table-container { overflow-x: auto; }
  .table-container table { min-width: 640px; }
  th, td { padding: 0.65rem 0.7rem; }
  .modal-content { padding: 1.4rem 1.1rem; border-radius: 16px; }
  /* His inline layouts: grids stack, flex rows wrap, charts/inputs never wider than the screen. */
  .main-content [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .main-content [style*="grid"] > *, .main-content [style*="flex"] > * { min-width: 0; }
  .main-content [style*="display:flex"], .main-content [style*="display: flex"] { flex-wrap: wrap; }
  .main-content canvas { max-width: 100% !important; }
  #searchInput { width: 100% !important; }
  .main-content .flex { flex-wrap: wrap; }
  .main-content input[style*="width"], .main-content select[style*="width"] { max-width: 100%; }
  .main-content .flex > input[style*="width"], .main-content .flex > select[style*="width"] { flex: 1 1 160px; width: auto !important; }
  #searchInput { min-width: 0; }
  .main-content div[style*="position: relative"]:has(> #searchInput) { flex: 1 1 100%; }
  .modal-content [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .pro-top { top: auto; bottom: 10px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 20px); padding: 5px 10px; }
  .pro-user { display: none; }
}
@media (max-width: 420px) {
  .stats-grid, .kpi-grid, .report-grid, .gmroi-grid { grid-template-columns: 1fr; }
}
@media print { .pro-top { display: none !important; } }
