@font-face {
    font-family: 'Vazirmatn';
    src: local('Vazirmatn');
}

* { box-sizing: border-box; }

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background: #f4f5f7;
    margin: 0;
    color: #1f2430;
    direction: rtl;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
}

.top-nav {
    background: #fff;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 10;
}
.top-nav a { color: #2563eb; text-decoration: none; font-size: 14px; }

.auth-box {
    max-width: 380px;
    margin: 60px auto;
    padding: 24px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.auth-box h2 { margin-top: 0; font-size: 20px; }
.auth-box p { color: #6b7280; font-size: 14px; }

label { display: block; font-size: 13px; color: #374151; margin: 12px 0 6px; }

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #2563eb;
}

button, .btn {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
.btn-primary { background: #2563eb; color: #fff; }
.btn-block { width: 100%; margin-top: 16px; }
.btn-secondary { background: #e5e7eb; color: #1f2430; }
.btn-danger { background: #fee2e2; color: #b91c1c; }
.btn-link { background: none; color: #2563eb; padding: 4px 0; }

.action-row { display: flex; gap: 10px; margin-bottom: 20px; }
.action-row .btn { flex: 1; }

.alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 10px; }
.alert-error { background: #fee2e2; color: #b91c1c; }
.alert-info { background: #eef2ff; color: #4338ca; }

.link-back { display: block; margin-top: 14px; font-size: 13px; color: #6b7280; text-align: center; }

.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    display: block;
    text-decoration: none;
    color: inherit;
}
.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.order-card-body { font-size: 13px; color: #4b5563; line-height: 1.8; }

.badge { font-size: 11px; padding: 4px 10px; border-radius: 20px; background: #e5e7eb; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-confirmed { background: #d1fae5; color: #065f46; }
.badge-rejected { background: #fee2e2; color: #b91c1c; }
.badge-done { background: #dbeafe; color: #1e40af; }
.badge.brand-pakroyall { background: #ede9fe; color: #6d28d9; }
.badge.brand-nezafatiranian { background: #dbeafe; color: #2563eb; }
.badge.brand-nikomanesh { background: #f3e8ff; color: #7c3aed; }

.empty-state { color: #9ca3af; text-align: center; padding: 30px 0; font-size: 14px; }

.form-card { background: #fff; padding: 16px; border-radius: 12px; margin-bottom: 20px; }
.row-2col { display: flex; gap: 10px; }
.row-2col > div { flex: 1; }

.filter-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 4px; }
.filter-tabs a {
    white-space: nowrap;
    padding: 8px 14px;
    border-radius: 20px;
    background: #fff;
    color: #4b5563;
    text-decoration: none;
    font-size: 13px;
}
.filter-tabs a.tab-active { background: #2563eb; color: #fff; }

.order-actions { margin-top: 12px; border-top: 1px dashed #e5e7eb; padding-top: 12px; }
.order-actions label { font-size: 12px; }
.btn-row { display: flex; gap: 8px; margin-top: 10px; }
.btn-row button { flex: 1; }
.inline-amount { width: 100px; display: inline-block; padding: 4px 8px; }

.invoice-box { background: #fff; border-radius: 12px; padding: 20px; margin-top: 30px; }
.invoice-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.invoice-table td { padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.invoice-table td:first-child { color: #6b7280; width: 40%; }
.total-row td { font-weight: bold; font-size: 16px; color: #111827; }
.muted { color: #9ca3af; font-size: 12px; }
.small { font-size: 11px; }

.ticket-thread { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.ticket-message { padding: 10px 14px; border-radius: 12px; max-width: 85%; font-size: 14px; }
.msg-customer { background: #ede9fe; align-self: flex-start; }
.msg-staff { background: #fff; align-self: flex-end; border: 1px solid #e5e7eb; }
.msg-role { font-size: 11px; color: #6b7280; margin-bottom: 4px; }
.msg-time { font-size: 10px; color: #9ca3af; margin-top: 4px; }
