* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    direction: rtl;
    font-size: 16px;
    padding-bottom: 80px;
    min-height: 100vh;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 15px;
}

h1, h2 {
    text-align: center;
    margin: 15px 0;
    color: #c2185b;
    font-size: 1.4em;
}

/* === أزرار === */
.btn {
    display: block;
    width: 100%;
    padding: 14px;
    margin: 8px 0;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    color: #fff;
}

.btn-primary { background: #c2185b; }
.btn-success { background: #388e3c; }
.btn-warning { background: #f57c00; }
.btn-info { background: #1976d2; }
.btn-danger { background: #d32f2f; }
.btn-secondary { background: #757575; }

.btn:active { opacity: 0.8; transform: scale(0.98); }

/* === حقول الإدخال === */
input, select, textarea {
    width: 100%;
    padding: 12px;
    margin: 6px 0;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    direction: rtl;
    background: #fff;
    -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
    border-color: #c2185b;
    outline: none;
}

label {
    display: block;
    margin: 10px 0 4px;
    font-weight: bold;
    font-size: 14px;
    color: #555;
}

/* === البطاقات === */
.card {
    background: #fff;
    border-radius: 14px;
    padding: 15px;
    margin: 10px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card h3 {
    color: #c2185b;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.card p {
    margin: 4px 0;
    font-size: 14px;
    color: #666;
}

/* === الحالات === */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    color: #fff;
}

.badge-new { background: #1976d2; }
.badge-progress { background: #f57c00; }
.badge-done { background: #388e3c; }

/* === الرسائل === */
.msg {
    padding: 12px;
    border-radius: 10px;
    margin: 10px 0;
    text-align: center;
    font-weight: bold;
}

.msg-success { background: #c8e6c9; color: #2e7d32; }
.msg-warning { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }
.msg-error { background: #ffcdd2; color: #c62828; }

/* === شريط التنقل السفلي === */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 65px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    border-top: 1px solid #eee;
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #999;
    font-size: 11px;
    padding: 5px;
    min-width: 55px;
    transition: color 0.2s;
}

.bottom-nav a .icon {
    font-size: 22px;
    margin-bottom: 3px;
}

.bottom-nav a.active {
    color: #c2185b;
}

.bottom-nav a:active {
    color: #c2185b;
}

/* === صفحة تسجيل الدخول === */
.login-box {
    max-width: 360px;
    margin: 80px auto;
    padding: 30px 20px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.login-box h1 {
    font-size: 2em;
    margin-bottom: 25px;
}

/* === الجدول === */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 14px;
}

table th, table td {
    padding: 10px 8px;
    text-align: right;
    border-bottom: 1px solid #eee;
}

table th {
    background: #fce4ec;
    color: #c2185b;
    font-weight: bold;
}

/* === الإيصال === */
.receipt {
    background: #fff;
    padding: 20px;
    margin: 10px auto;
    max-width: 400px;
    border: 2px dashed #ccc;
    border-radius: 10px;
}

.receipt h2 {
    border-bottom: 2px solid #c2185b;
    padding-bottom: 10px;
}

.receipt .note {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #ccc;
    text-align: center;
    font-size: 13px;
    color: #888;
}

/* === الصفحة الرئيسية === */
.home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
}

.home-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px 10px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.home-card:active {
    transform: scale(0.96);
}

.home-card .icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.home-card .label {
    font-size: 14px;
    font-weight: bold;
}

/* === ملخص === */
.summary-box {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    margin: 10px 0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.summary-box .number {
    font-size: 2em;
    font-weight: bold;
    color: #c2185b;
}

.summary-box .title {
    font-size: 14px;
    color: #888;
    margin-top: 5px;
}

/* === متفرقات === */
.mt { margin-top: 15px; }
.mb { margin-bottom: 15px; }
.text-center { text-align: center; }
.text-muted { color: #999; font-size: 13px; }

hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 15px 0;
}

.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.inline-form select, .inline-form input {
    flex: 1;
}

.inline-form .btn {
    width: auto;
    white-space: nowrap;
    padding: 12px 16px;
}
