/* بريق - Bariq custom styles */
* { box-sizing: border-box; }
body { direction: rtl; }

.scrollbar-thin::-webkit-scrollbar { width: 6px; height: 6px; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem 1.1rem; border-radius: .55rem; font-weight: 600; font-size: .875rem; transition: all .15s; cursor: pointer; white-space: nowrap; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: #0f766e; color: white; }
.btn-primary:hover:not(:disabled) { background: #115e59; }
.btn-secondary { background: #e2e8f0; color: #334155; }
.btn-secondary:hover:not(:disabled) { background: #cbd5e1; }
.btn-danger { background: #dc2626; color: white; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-outline { background: white; border: 1px solid #cbd5e1; color: #334155; }
.btn-outline:hover:not(:disabled) { background: #f1f5f9; }
.btn-sm { padding: .35rem .75rem; font-size: .8rem; }

.input, select.input, textarea.input {
  width: 100%; padding: .6rem .85rem; border: 1px solid #cbd5e1; border-radius: .5rem;
  font-size: .9rem; background: white; color: #1e293b; outline: none; transition: border-color .15s;
}
.input:focus { border-color: #0f766e; box-shadow: 0 0 0 3px rgba(15,118,110,.1); }
.input.error { border-color: #dc2626; }

.label { display: block; font-size: .82rem; font-weight: 600; color: #475569; margin-bottom: .3rem; }
.hint { font-size: .75rem; color: #94a3b8; margin-top: .2rem; }
.error-text { font-size: .78rem; color: #dc2626; margin-top: .25rem; }

.card { background: white; border-radius: .85rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); border: 1px solid #eef2f4; }

.badge { display: inline-flex; align-items: center; padding: .15rem .6rem; border-radius: 9999px; font-size: .72rem; font-weight: 700; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-blue { background: #dbeafe; color: #1e40af; }

table.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
table.data-table th { text-align: right; padding: .6rem .8rem; background: #f8fafc; color: #64748b; font-weight: 700; font-size: .78rem; border-bottom: 1px solid #e2e8f0; }
table.data-table td { padding: .6rem .8rem; border-bottom: 1px solid #f1f5f9; }
table.data-table tbody tr:hover { background: #f8fafc; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 1rem; }
.modal-box { background: white; border-radius: 1rem; width: 100%; max-height: 90vh; overflow-y: auto; }

.toast { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%); z-index: 200; padding: .75rem 1.5rem; border-radius: .6rem; font-weight: 600; font-size: .9rem; box-shadow: 0 4px 14px rgba(0,0,0,.15); animation: toastIn .2s ease; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

.sidebar-link { display: flex; align-items: center; gap: .7rem; padding: .65rem .9rem; border-radius: .55rem; color: #cbd5e1; font-size: .875rem; font-weight: 600; transition: all .15s; cursor: pointer; }
.sidebar-link:hover { background: rgba(255,255,255,.08); color: white; }
.sidebar-link.active { background: #0f766e; color: white; }

.pos-product-card { cursor: pointer; transition: all .12s; }
.pos-product-card:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,.08); border-color: #0f766e; }

@media print { .no-print { display: none !important; } }

/* ===== Mobile responsive layout ===== */
@media (max-width: 767px) {
  #sidebar {
    position: fixed;
    top: 0; bottom: 0; right: 0;
    z-index: 50;
    width: 260px;
    max-width: 80vw;
    transform: translateX(100%);
    transition: transform .22s ease;
  }
  #sidebar.sidebar-open { transform: translateX(0); }
  #main-content { padding-top: 3.25rem; }
}
