* { box-sizing: border-box; }
body {
    font-family: Tahoma, "Segoe UI", Arial, sans-serif;
    background: #f4f6f8;
    margin: 0;
    color: #222;
    direction: rtl;
}
.navbar {
    background: #0f6d5c;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    flex-wrap: wrap;
}
.nav-brand { font-weight: bold; font-size: 18px; }
.nav-links a {
    color: white;
    text-decoration: none;
    margin: 0 8px;
    font-size: 13px;
}
.nav-links a:hover { text-decoration: underline; }
.nav-user { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.btn-logout {
    background: rgba(255,255,255,0.15);
    padding: 4px 10px;
    border-radius: 4px;
}
.container { max-width: 1050px; margin: 24px auto; padding: 0 16px; }
.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
h2 { color: #0f6d5c; }
h3 { margin-top: 0; }
.muted { color: #888; font-size: 14px; }
label { display: block; margin-top: 12px; margin-bottom: 4px; font-size: 14px; font-weight: bold; }
input[type=text], input[type=password], input[type=date], input[type=time], input[type=number],
input[type=file], select, textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}
textarea { resize: vertical; }
.two-col { display: flex; gap: 14px; }
.two-col > div { flex: 1; }
.btn {
    display: inline-block;
    padding: 8px 18px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    margin-top: 16px;
    margin-left: 8px;
}
.btn-primary { background: #0f6d5c; color: white; }
.btn-primary:hover { background: #0c5548; }
.btn-secondary { background: #eee; color: #333; }
.btn-sm { padding: 4px 10px; font-size: 12px; margin-top: 0; }
.btn-lg { font-size: 16px; padding: 10px 24px; }
.btn-block { display: block; text-align: right; margin-bottom: 8px; }

.login-wrapper { max-width: 480px; margin: 40px auto; }
.login-banner {
    height: 160px;
    background-size: cover;
    background-position: center;
    border-radius: 8px 8px 0 0;
}
.login-box {
    background: white;
    padding: 30px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.header-banner {
    height: 130px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 20px;
}

.flash { padding: 10px 16px; border-radius: 4px; margin-bottom: 16px; font-size: 14px; }
.flash-error { background: #fde8e8; color: #a12b2b; }
.flash-success { background: #e6f7ee; color: #0f6d5c; }

.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { border: 1px solid #e0e0e0; padding: 8px 10px; text-align: right; }
.data-table th { background: #f0f3f2; }
.row-problem { background: #fdecec; }

.filter-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.filter-form label { margin-top: 0; }

.checklist-table td { vertical-align: middle; }
.status-options { display: flex; gap: 10px; flex-wrap: wrap; }
.status-label { font-weight: normal; display: flex; align-items: center; gap: 4px; margin: 0; font-size: 13px; white-space: nowrap; }

.checkbox-options { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.checkbox-options label { font-weight: normal; display: flex; align-items: center; gap: 4px; font-size: 14px; }

.monthly-table td { vertical-align: top; }
.check-cell { text-align: center; }
.check-empty { color: #ccc; }
.tag-pill {
    display: inline-block;
    background: #e6f7ee;
    color: #0f6d5c;
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 12px;
    margin: 2px 4px 2px 0;
}

.option-list { list-style: none; padding: 0; margin: 0; }

/* نمودار میله‌ای ساده با CSS (بدون نیاز به اینترنت/کتابخانه خارجی) */
.bar-chart { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-label { width: 180px; font-size: 13px; flex-shrink: 0; }
.bar-track { flex: 1; background: #eef2f1; border-radius: 4px; height: 20px; overflow: hidden; }
.bar-fill { background: #0f6d5c; height: 100%; border-radius: 4px; transition: width .3s; }
.bar-fill-alt { background: #2b8f78; }
.bar-fill-3 { background: #59b39a; }
.bar-value { width: 36px; text-align: left; font-size: 13px; font-weight: bold; }

/* پرینت */
.print-toolbar { margin-bottom: 16px; }
.print-sheet { background: white; padding: 24px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.print-meta { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 14px; }
.print-meta td { border: 1px solid #e0e0e0; padding: 8px 10px; }
.print-meta td:nth-child(1), .print-meta td:nth-child(3) { font-weight: bold; background: #f7f9f8; width: 18%; }
.print-notes { margin-top: 16px; font-size: 14px; }
.invoice-preview img { max-width: 100%; border-radius: 6px; margin-top: 8px; border: 1px solid #ddd; }

@media print {
    .navbar, .no-print, .flash { display: none !important; }
    body { background: white; }
    .container { max-width: 100%; margin: 0; padding: 0; }
    .print-sheet { box-shadow: none; padding: 0; }
}
