/* أسلوب عام */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.page-body {
    margin: 0;
    font-family: "Tajawal", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f3f4f6;
    color: #111827;
}

/* شريط علوي */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(90deg, #e5f0ff, #f0fdf4);
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1d4ed8;
}

.top-bar-right {
    font-size: 0.9rem;
    color: #4b5563;
}

.top-time {
    white-space: nowrap;
}

.main-container {
    max-width: 1080px;
    margin: 1.5rem auto 2.5rem;
    padding: 0 1rem;
}

/* الهيرو */
.hero-card {
    background-color: #ffffff;
    border-radius: 1rem;
    padding: 1.75rem 1.5rem;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.06);
    margin-bottom: 1.5rem;
}

.hero-content h1 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.highlight {
    color: #2563eb;
}

.hero-text {
    margin: 0.25rem 0 1.25rem;
    color: #4b5563;
}

.status-row {
    margin-bottom: 1rem;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background-color: #eff6ff;
    border: 1px solid #dbeafe;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background-color: #9ca3af;
}

.status-dot.online {
    background-color: #22c55e;
}

.status-dot.busy {
    background-color: #f97316;
}

.status-dot.offline {
    background-color: #9ca3af;
}

.status-text {
    font-size: 0.9rem;
    color: #111827;
}

/* أزرار */
.actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
    white-space: nowrap;
}

.btn-primary {
    background-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.35);
}

.btn-outline {
    background-color: #ffffff;
    color: #111827;
    border-color: #d1d5db;
}

.btn-outline:hover {
    background-color: #f9fafb;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: default;
    box-shadow: none;
    transform: none;
}

/* كارت أوقات العمل */
.worktime-card {
    border-radius: 0.75rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 0.9rem 1rem;
}

.worktime-card h2 {
    font-size: 1rem;
    margin: 0 0 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.worktime-card p {
    margin: 0.15rem 0;
    font-size: 0.92rem;
    color: #4b5563;
}

/* كارت الانتظار */
.queue-card {
    border-radius: 0.75rem;
    background-color: #eff6ff;
    border: 1px dashed #bfdbfe;
    padding: 0.9rem 1rem;
    margin-top: 0.75rem;
}

.queue-card h2 {
    font-size: 1rem;
    margin: 0 0 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.queue-result {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #111827;
}

/* مميزات */
.features-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.feature-card {
    background-color: #ffffff;
    border-radius: 0.9rem;
    padding: 1rem 1rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.feature-card h3 {
    margin: 0.4rem 0;
    font-size: 1rem;
}

.feature-card p {
    margin: 0.15rem 0 0;
    font-size: 0.92rem;
    color: #4b5563;
}

.feature-icon {
    font-size: 1.4rem;
    color: #2563eb;
}

/* لوحة التحكم */
.admin-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.admin-card {
    background-color: #ffffff;
    border-radius: 1rem;
    padding: 1.25rem 1.25rem 1.4rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.admin-card h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem 1rem;
    margin-top: 0.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group label {
    font-size: 0.9rem;
    color: #374151;
}

.form-group input,
.form-group select {
    padding: 0.45rem 0.6rem;
    border-radius: 0.6rem;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.form-actions {
    grid-column: 1 / -1;
    margin-top: 0.3rem;
}

/* ملاحظات صغيرة */
.small-note {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #6b7280;
}

/* جدول الطلبات وقائمة الانتظار */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.orders-table th,
.orders-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.5rem 0.4rem;
    text-align: right;
}

.orders-table thead {
    background-color: #f9fafb;
}

.orders-table th {
    font-weight: 600;
    color: #374151;
}

.orders-table tr:hover {
    background-color: #f3f4f6;
}

.table-btn {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    font-size: 0.75rem;
    cursor: pointer;
}

.table-btn:hover {
    background-color: #f3f4f6;
}

/* إحصائيات */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
    margin-top: 0.5rem;
}

.stat-box {
    background-color: #f9fafb;
    border-radius: 0.75rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid #e5e7eb;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.2rem;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
}

/* Toast (يمكن استخدامه لاحقاً إذا احتجت JS) */
.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.65rem 1rem;
    border-radius: 999px;
    background-color: #16a34a;
    color: #ffffff;
    font-size: 0.9rem;
    box-shadow: 0 15px 40px rgba(22, 163, 74, 0.4);
    z-index: 50;
}

.toast.error {
    background-color: #ef4444;
    box-shadow: 0 15px 40px rgba(239, 68, 68, 0.4);
}

.hidden {
    display: none !important;
}

/* الفوتر */
.footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.85rem;
    color: #6b7280;
}

/* استجابة الشاشات الكبيرة */
@media (min-width: 768px) {
    .hero-content h1 {
        font-size: 1.9rem;
    }

    .features-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.static-page-content {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.9;
    color: #374151;
    white-space: pre-wrap;
}