* { margin:0; padding:0; box-sizing:border-box; }
body {
    font-family: 'Cairo', sans-serif;
    background: #f0f2f5;
    color: #333;
    direction: rtl;
}
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #0a2a44;
}
.login-box {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 380px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.login-box h2 { color: #0a2a44; margin-bottom: 5px; font-size: 1.4em; }
.login-box h2 span { color: #f5a623; }
.login-box p { color: #888; font-size: 14px; margin-bottom: 25px; }
.login-box input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    margin-bottom: 15px;
    transition: 0.3s;
}
.login-box input:focus { border-color: #f5a623; outline: none; }
.login-btn {
    width: 100%;
    padding: 12px;
    background: #2b5470;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: 0.3s;
}
.login-btn:hover { background: #3a6b8c; }
.login-error { color: #e74c3c; font-size: 14px; margin-top: 10px; }
.dashboard { display: none; }
.dashboard-header {
    background: #0a2a44;
    color: #fff;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dashboard-header h3 { font-size: 1.1em; }
.dashboard-header h3 span { color: #f5a623; }
.dashboard-header .logout-btn {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    padding: 6px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    transition: 0.3s;
}
.dashboard-header .logout-btn:hover { background: #fff; color: #0a2a44; }
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 15px;
    padding: 25px;
    max-width: 1200px;
    margin: 0 auto;
}
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.stat-card h4 { font-size: 1.6em; color: #0a2a44; }
.stat-card .stat-num { font-size: 1.8em; font-weight: 800; color: #f5a623; }
.dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px 25px;
}
.dashboard-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.dashboard-toolbar h3 { font-size: 1.2em; color: #0a2a44; }
.dashboard-toolbar input, .dashboard-toolbar select {
    padding: 8px 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
}
.dashboard-toolbar input:focus, .dashboard-toolbar select:focus { border-color: #f5a623; outline: none; }
.table-wrap {
    overflow-x: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
th {
    background: #0a2a44;
    color: #fff;
    padding: 12px 10px;
    text-align: center;
    font-weight: 700;
}
td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #eee;
}
tr:hover td { background: #f8f9fc; }
.status-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}
.status-new { background: #e8f0fe; color: #1a73e8; }
.status-progress { background: #fef3e8; color: #e67e22; }
.status-done { background: #e6f7ed; color: #27ae60; }
.status-cancelled { background: #fde8e8; color: #e74c3c; }
.status-select {
    padding: 5px 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}
.status-select:focus { outline: none; border-color: #f5a623; }
.action-btn {
    padding: 5px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    transition: 0.3s;
}
.delete-btn { background: #fde8e8; color: #e74c3c; }
.delete-btn:hover { background: #e74c3c; color: #fff; }
.view-btn { background: #e8f0fe; color: #1a73e8; margin-left: 4px; }
.view-btn:hover { background: #1a73e8; color: #fff; }
.reply-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    background: #27ae60;
    color: #fff;
}
.reply-badge-zero { background: #ddd; color: #888; }
.empty-msg { padding: 40px; text-align: center; color: #888; font-size: 1em; }

/* ===== Dashboard Tabs ===== */
.dashboard-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.d-tab {
    flex: 1;
    padding: 14px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: 0.3s;
    border-bottom: 3px solid transparent;
}
.d-tab:hover { color: #0a2a44; background: #f8f9fc; }
.d-tab.active { color: #0a2a44; border-bottom-color: #f5a623; }
.d-tab-content { display: none; }
.d-tab-content.active { display: block; }

/* ===== Admins ===== */
.admins-list { margin-bottom: 20px; }
.add-admin-form {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.add-admin-form h4 { color: #0a2a44; margin-bottom: 15px; font-size: 1em; }
.add-admin-form input {
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    margin-left: 10px;
    width: 200px;
    transition: 0.3s;
}
.add-admin-form input:focus { border-color: #f5a623; outline: none; }

/* ===== Order Modal ===== */
.order-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    inset: 0;
    align-items: center;
    justify-content: center;
}
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}
.modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 520px;
    max-width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.modal-close {
    position: absolute;
    top: 12px;
    left: 16px;
    font-size: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    line-height: 1;
    transition: 0.3s;
}
.modal-close:hover { color: #e74c3c; }
.modal-content h3 { color: #0a2a44; margin-bottom: 20px; font-size: 1.3em; text-align: center; }
.modal-info { margin-bottom: 20px; }
.info-row {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #333;
}
.info-row strong { color: #0a2a44; }
.modal-replies h4 { color: #0a2a44; margin-bottom: 10px; font-size: 1em; }
#repliesList {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
}
.reply-item {
    background: #f8f9fc;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 8px;
}
.reply-text { font-size: 14px; color: #333; line-height: 1.5; }
.reply-date { font-size: 11px; color: #888; margin-top: 5px; }
.modal-reply-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 10px;
    transition: 0.3s;
    box-sizing: border-box;
}
.modal-reply-form textarea:focus { border-color: #f5a623; outline: none; }

/* ===== Services ===== */
.services-list { margin-bottom: 20px; }
.add-service-form {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.add-service-form h4 { color: #0a2a44; margin-bottom: 15px; font-size: 1em; }
.sv-form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.add-service-form input, .add-service-form textarea {
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    transition: 0.3s;
    box-sizing: border-box;
    width: 100%;
}
.add-service-form input:focus, .add-service-form textarea:focus { border-color: #f5a623; outline: none; }
.add-service-form textarea { margin-bottom: 10px; }

@media (max-width:700px) {
    .dashboard-stats { grid-template-columns: repeat(2,1fr); }
    th, td { padding: 8px 5px; font-size: 12px; }
    .dashboard-toolbar { flex-direction: column; align-items: stretch; }
    .dashboard-toolbar input, .dashboard-toolbar select { width: 100%; }
}
@media (max-width:450px) {
    .dashboard-stats { grid-template-columns: 1fr; }
}
