/* =========================================================
   میخرم | استایل پایه لاکچری
   ========================================================= */

/* متغیرهای رنگ — دارک پیش‌فرض */
:root {
    --bg:           #0d0d0f;
    --bg-card:      #16161a;
    --bg-elevated:  #1c1c22;
    --border:       #26262e;
    --border-light: #33333d;
    --text:         #e8e8ea;
    --text-soft:    #c5c5ca;
    --text-muted:   #8a8a95;
    --text-faint:   #5a5a65;

    --gold:         #d4af37;
    --gold-light:   #e8c860;
    --gold-dark:    #a68a2b;
    --gold-soft:    rgba(212, 175, 55, 0.10);
    --gold-glow:    rgba(212, 175, 55, 0.20);

    --success:      #4caf50;
    --danger:       #e74c3c;
    --info:         #3498db;
}

/* لایت مود */
.light-mode {
    --bg:           #f5f4f0;
    --bg-card:      #ffffff;
    --bg-elevated:  #fafaf7;
    --border:       #e5e3dc;
    --border-light: #d5d2c8;
    --text:         #1a1a1a;
    --text-soft:    #44443f;
    --text-muted:   #666660;
    --text-faint:   #999992;

    --gold:         #a68a2b;
    --gold-light:   #c9a542;
    --gold-dark:    #7d651f;
    --gold-soft:    rgba(166, 138, 43, 0.08);
    --gold-glow:    rgba(166, 138, 43, 0.15);
}

/* ریست */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    direction: rtl;
    font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    min-height: 100vh;
    transition: background .3s ease, color .3s ease;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, textarea, select {
    font-family: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
    display: block;
}

/* ============ ساختار ============ */
.site-main {
    width: 100%;
    min-height: calc(100vh - 150px);
}

.header-container,
.footer-container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}

/* ============ تایپوگرافی ============ */
h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    font-weight: 800;
    line-height: 1.4;
}

h1 { font-size: 32px; }
h2 { font-size: 26px; }
h3 { font-size: 20px; }

p {
    color: var(--text-soft);
}

/* ============ Footer ============ */
.site-footer {
    margin-top: 80px;
    padding: 45px 0 30px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.footer-brand strong {
    display: block;
    color: var(--gold);
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 6px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
}

.footer-links a {
    color: var(--text-soft);
    font-size: 14px;
    transition: color .2s;
    position: relative;
}

.footer-links a::after {
    content: "";
    position: absolute;
    bottom: -3px;
    right: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width .25s ease;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-copy {
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-faint);
    font-size: 13px;
}

/* ============ دکمه‌ها ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 8px 26px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: #1a1a1a;
    font-weight: 800;
    font-size: 14px;
    transition: all .25s ease;
    box-shadow: 0 4px 14px var(--gold-soft);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px var(--gold-glow);
}

.btn-dark {
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--border-light);
    box-shadow: none;
}

.btn-dark:hover {
    background: var(--bg-card);
    border-color: var(--gold);
    color: var(--gold);
}

/* ============ فرم‌ها ============ */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    font-size: 14px;
    transition: all .2s ease;
}

.form-control::placeholder {
    color: var(--text-faint);
}

.form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-soft);
}

/* ============ کارت ============ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    transition: border-color .25s, transform .25s;
}

.card:hover {
    border-color: var(--border-light);
}

/* ============ پیام‌ها ============ */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    border: 1px solid;
}

.alert-error {
    background: rgba(231, 76, 60, 0.08);
    border-color: rgba(231, 76, 60, 0.35);
    color: #f5a9a2;
}

.alert-success {
    background: rgba(76, 175, 80, 0.08);
    border-color: rgba(76, 175, 80, 0.35);
    color: #a9e7bb;
}

/* لایت مود برای alert */
.light-mode .alert-error {
    color: #c0392b;
    background: rgba(231, 76, 60, 0.06);
}
.light-mode .alert-success {
    color: #2e7d32;
    background: rgba(76, 175, 80, 0.06);
}

/* ============ دکمه تغییر تم ============ */
.theme-toggle {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border-light);
    border-radius: 50%;
    background: var(--bg-elevated);
    color: var(--gold);
    cursor: pointer;
    transition: all .3s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
   
    border-color: var(--gold);
    box-shadow: 0 0 16px var(--gold-glow);
}

.theme-icon {
    width: 22px;
    height: 22px;
}

/* آیکون طلایی برای دسته‌ها */
.category-icon,
.mikhrm-category-icon,
.mikhrm-urgent-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
}

.category-icon svg,
.mikhrm-category-icon svg,
.mikhrm-urgent-icon svg {
    width: 40px;
    height: 40px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* اسکرول‌بار زیبا */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-dark);
}
/* ============ صفحه ۴۰۴ ============ */
.notfound-page {
    min-height: calc(100vh - 72px);
    padding: 60px 20px 80px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.notfound-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.notfound-box {
    padding: 50px 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 22px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, .25);
}

.light-mode .notfound-box {
    box-shadow: 0 15px 50px rgba(0, 0, 0, .06);
}

.notfound-box::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.notfound-icon {
    width: 130px;
    height: 130px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, var(--gold-soft), transparent 70%);
    border: 1px solid var(--gold-dark);
    border-radius: 50%;
    color: var(--gold);
    position: relative;
    animation: notfoundPulse 3s ease-in-out infinite;
}

@keyframes notfoundPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.notfound-code {
    font-size: 72px;
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 14px;
    letter-spacing: 4px;
    font-family: monospace;
    direction: ltr;
}

.notfound-box h1 {
    margin: 0 0 14px;
    color: var(--text);
    font-size: 22px;
    font-weight: 900;
}

.notfound-box p {
    margin: 0 0 26px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 2;
}

.notfound-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 26px;
    flex-wrap: wrap;
}

.notfound-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 22px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s ease;
}

.notfound-btn:hover {
    color: var(--gold);
    border-color: var(--gold);
    transform: translateY(-2px);
}

.notfound-btn.gold {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border-color: var(--gold);
    color: #1a1a1a;
    box-shadow: 0 4px 12px var(--gold-soft);
}

.notfound-btn.gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--gold-glow);
    color: #1a1a1a;
}

.notfound-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    font-size: 12px;
}

.notfound-links span {
    color: var(--text-muted);
}

.notfound-links a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 700;
}

.notfound-links a:hover {
    text-decoration: underline;
}

@media (max-width: 550px) {
    .notfound-page { padding: 40px 15px 60px; }
    .notfound-box { padding: 36px 22px; border-radius: 18px; }
    .notfound-code { font-size: 56px; }
    .notfound-icon { width: 100px; height: 100px; }
    .notfound-icon svg { width: 56px; height: 56px; }
    .notfound-box h1 { font-size: 18px; }
    .notfound-btn { width: 100%; justify-content: center; }
    .notfound-actions { flex-direction: column; }
}