﻿/* ============================================================
   1) فونت‌ها
   ============================================================ */
@font-face {
    font-family: 'Vazir';
    src: url('fonts/Vazir/Vazir.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'irn-sns';
    src: url('fonts/ttf/IRANSansWeb(FaNum).ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

/* ============================================================
   2) پایه و تایپوگرافی
   ============================================================ */
body, html {
    font-family: 'irn-sns', sans-serif;
    direction: rtl;
}

body {
    background-color: var(--mud-palette-background-gray);
}

.mud-typography,
.mud-button-label,
.mud-input,
.mud-breadcrumb-item {
    font-family: 'irn-sns', sans-serif;
}

/* ============================================================
   3) کلاس‌های کمکی
   ============================================================ */
.text-center {
    text-align: center;
}

.rounded-2xl {
    border-radius: 1rem;
}

.mud-chart {
    display: contents;
}

.mud-tab {
    min-width: 140px !important;
}

.red {
    color: tomato;
    font-weight: bold;
}

.orange {
    color: darkorange;
}

.yellow {
    color: goldenrod;
}

.green {
    color: green;
}

.expired {
    color: red !important;
    text-decoration: line-through;
}

/* ============================================================
   4) کارت‌ها و ظروف عمومی
   ============================================================ */
.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    cursor: pointer;
    object-fit: cover;
    margin: auto;
    display: block;
}

.report-card {
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}

.prsonl-itm {
    color: #999;
    border: dashed 1px var(--mud-palette-action-disabled-background);
    border-radius: 8px;
    background-color: var(--mud-palette-background);
}

.border-gray-100 {
    border-color: var(--mud-palette-divider);
}

.shadow-sm {
    --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --tw-shadow-colored: 0 1px 2px 0 var(--mud-palette-background-gray);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--mud-palette-background-gray, 0 0 #0000), var(--mud-palette-background-gray);
}

/* ============================================================
   5) کارت‌های وضعیت (قدیمی و جدید)
   ============================================================ */

/* 5-الف) status-card قدیمی */
.status-card {
    cursor: pointer;
    transition: all .2s ease-in-out;
}

    .status-card.selected {
        border-bottom: 3px solid #1976d2;
    }

/* 5-ب) گرید stat-card: ۷ ستونی (صفحه پرسنل) */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

@media (max-width: 1400px) {
    .stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 5-ج) گرید stat-card: ۵ ستونی (صفحه متقاضیان) */
.stat-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

@media (max-width: 1200px) {
    .stat-grid-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .stat-grid-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 5-د) stat-card مشترک */
.stat-card {
    border-radius: 14px;
    padding: 14px 10px;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s;
    position: relative;
    text-align: center;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

    .stat-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
    }

    .stat-card.active {
        border-color: #0a2540;
        box-shadow: 0 0 0 3px rgba(10, 37, 64, 0.15), 0 8px 18px rgba(0, 0, 0, 0.18);
        transform: translateY(-3px);
    }

    .stat-card .stat-icon-wrap {
        width: 42px;
        height: 42px;
        margin: 0 auto 6px auto;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.7);
    }

    .stat-card .stat-value {
        font-size: 22px;
        font-weight: 700;
        line-height: 1.1;
    }

    .stat-card .stat-label {
        font-size: 12px;
        opacity: 0.85;
        margin-top: 2px;
    }

    .stat-card .stat-pct {
        font-size: 10px;
        opacity: 0.65;
        margin-top: 2px;
    }

    .stat-card .stat-check {
        position: absolute;
        top: 6px;
        right: 6px;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: #0a2540;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
    }

/* ============================================================
   6) Hero صفحه
   ============================================================ */
.page-hero {
    background: linear-gradient(135deg, #0a2540 0%, #1565c0 100%);
    border-radius: 16px;
    padding: 20px 24px;
    color: white;
    box-shadow: 0 6px 20px rgba(10, 37, 64, 0.25);
}

    .page-hero .hero-title {
        font-size: 24px;
        font-weight: 700;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .page-hero .hero-subtitle {
        opacity: 0.85;
        font-size: 13px;
        margin-top: 4px;
    }

.hero-total-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.18);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
}

/* ============================================================
   7) نوار فیلتر
   ============================================================ */
.filter-bar {
    border-radius: 12px;
    padding: 12px 14px;
}

/* ============================================================
   8) آواتارها در جدول
   ============================================================ */
.avatar-cell {
    position: relative;
    display: inline-block;
}

    .avatar-cell .status-dot {
        position: absolute;
        bottom: 0;
        right: 0;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        border: 2px solid white;
    }

.app-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.crew-avatar-wrap {
    position: relative;
    display: inline-block;
}

    .crew-avatar-wrap .status-dot {
        position: absolute;
        bottom: 0;
        right: 0;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        border: 2px solid white;
    }

/* ============================================================
   9) نوار افقی کشتی‌ها (صفحه خدمه کشتی)
   ============================================================ */
.ship-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 6px 2px 10px 2px;
    scroll-behavior: smooth;
}

    .ship-strip::-webkit-scrollbar {
        height: 8px;
    }

    .ship-strip::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.15);
        border-radius: 4px;
    }

.ship-mini {
    min-width: 170px;
    max-width: 170px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--mud-palette-surface);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

    .ship-mini:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
        border-color: rgba(10, 37, 64, 0.2);
    }

    .ship-mini.active {
        border-color: #1565c0;
        background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
        box-shadow: 0 6px 16px rgba(21, 101, 192, 0.25);
    }

.ship-mini-stats {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin: 6px 0 4px 0;
    opacity: 0.85;
}

.ship-mini-bar {
    height: 4px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.ship-mini-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}

/* ============================================================
   10) Hero کشتی انتخاب‌شده
   ============================================================ */
.ship-hero {
    border-radius: 16px;
    background: linear-gradient(135deg, #0a2540 0%, #1565c0 100%);
    color: white;
    padding: 20px 24px;
    box-shadow: 0 6px 20px rgba(10, 37, 64, 0.25);
}

    .ship-hero .hero-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 5px 12px;
        border-radius: 18px;
        font-size: 12px;
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(4px);
    }

    .ship-hero .hero-action {
        color: white !important;
        background: rgba(255, 255, 255, 0.15) !important;
        transition: background 0.2s, transform 0.15s;
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

        .ship-hero .hero-action:hover {
            background: rgba(255, 255, 255, 0.32) !important;
            transform: scale(1.08);
        }

/* ============================================================
   11) کلاس‌های عمومی دیگر
   ============================================================ */
.bulk-bar {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #1565c0;
    color: white;
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.35);
    display: flex;
    align-items: center;
    gap: 16px;
}

.selected-row {
    background-color: rgba(25, 118, 210, 0.15);
}

.rep-loader {
    padding: 15px;
    border: solid 1px var(--mud-palette-divider);
    width: 80%;
    margin: 25px auto;
    text-align: center;
    font-size: 1.3rem;
    color: var(--mud-palette-drawer-icon);
}

/* ============================================================
   12) منوی کناری مدرن (نسخه فشرده + تک‌هاور)
   ============================================================ */

/* ---- 12-1) ظرف اصلی منو ---- */
.modern-drawer {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 10px 8px;
    background: var(--mud-palette-surface);
    overflow: hidden;
}

/* ---- 12-2) برند بالای منو ---- */
.drawer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0a2540 0%, #1565c0 100%);
    color: white;
    margin-bottom: 6px;
    flex-shrink: 0;
}

    .drawer-brand .brand-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.18);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .drawer-brand .brand-title {
        font-weight: 700;
        font-size: 13.5px;
        line-height: 1.2;
    }

    .drawer-brand .brand-subtitle {
        font-size: 10px;
        opacity: 0.8;
        line-height: 1.2;
    }

/* ---- 12-3) ناحیه اسکرول ---- */
.drawer-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 2px;
}

    .drawer-scroll::-webkit-scrollbar {
        width: 5px;
    }

    .drawer-scroll::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.12);
        border-radius: 3px;
    }

/* ---- 12-4) گروه‌های منو ---- */
.nav-group {
    margin-bottom: 8px;
}

    .nav-group:last-child {
        margin-bottom: 0;
    }

.nav-group-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
    padding: 4px 10px 2px 10px;
    opacity: 0.7;
}

/* ---- 12-5) لینک‌های منو (فشرده + تک‌هاور) ---- */
.nav-link-modern,
.mud-nav-link.nav-link-modern {
    display: flex !important;
    align-items: center;
    gap: 10px;
    border-radius: 8px !important;
    padding: 6px 10px !important;
    margin: 1px 0 !important;
    min-height: 34px !important;
    color: var(--mud-palette-text-primary) !important;
    font-weight: 500;
    font-size: 13px;
    line-height: 1.3;
    transition: background 0.15s, transform 0.15s, color 0.15s;
    border-right: 3px solid transparent;
    position: relative;
    background-color: transparent !important;
}

    /* خنثی‌سازی هاور پیش‌فرض MudBlazor */
    .mud-nav-link.nav-link-modern:hover,
    .mud-nav-link.nav-link-modern:focus,
    .mud-nav-link.nav-link-modern:focus-visible,
    .mud-nav-link.nav-link-modern:active {
        background-color: transparent !important;
    }

    /* فقط هاور سفارشی ما */
    .mud-nav-link.nav-link-modern:hover {
        background-color: rgba(21, 101, 192, 0.08) !important;
        color: var(--mud-palette-primary) !important;
        transform: translateX(-2px);
    }

    /* حالت فعال */
    .mud-nav-link.nav-link-modern.active {
        background: linear-gradient(90deg, rgba(21, 101, 192, 0.14) 0%, rgba(21, 101, 192, 0.04) 100%) !important;
        color: #1565c0 !important;
        border-right-color: #1565c0;
        font-weight: 600;
    }

    /* آیکون */
    .mud-nav-link.nav-link-modern .mud-icon-root {
        font-size: 18px !important;
        color: var(--mud-palette-text-secondary);
        transition: color 0.15s ease;
        margin: 0 !important;
    }

    .mud-nav-link.nav-link-modern:hover .mud-icon-root,
    .mud-nav-link.nav-link-modern.active .mud-icon-root {
        color: #1565c0 !important;
    }

    /* متن داخل لینک */
    .mud-nav-link.nav-link-modern .mud-nav-link-text {
        padding: 0 !important;
        margin: 0 !important;
    }

    /* 🚫 حذف کامل Ripple (منبع سوم دو هاور) */
    .mud-nav-link.nav-link-modern .mud-ripple,
    .mud-nav-link.nav-link-modern .mud-ripple-background,
    .mud-nav-link.nav-link-modern .mud-ripple-container {
        display: none !important;
        background: transparent !important;
        opacity: 0 !important;
    }

    .mud-nav-link.nav-link-modern::before,
    .mud-nav-link.nav-link-modern::after {
        display: none !important;
        content: none !important;
    }

/* ---- 12-6) فوتر منو ---- */
.drawer-footer {
    border-top: 1px solid var(--mud-palette-lines-default);
    padding: 8px 10px 4px 10px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.footer-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--mud-palette-text-primary);
}

.footer-subtitle {
    font-size: 10px;
    line-height: 1.2;
    color: var(--mud-palette-text-secondary);
}

/* ---- 12-7) دارک‌مود ---- */
.mud-theme-dark .mud-nav-link.nav-link-modern:hover {
    background-color: rgba(100, 181, 246, 0.1) !important;
}

.mud-theme-dark .mud-nav-link.nav-link-modern.active {
    background: linear-gradient(90deg, rgba(100, 181, 246, 0.2) 0%, rgba(100, 181, 246, 0.05) 100%) !important;
    border-right-color: #64b5f6;
    color: #64b5f6 !important;
}

    .mud-theme-dark .mud-nav-link.nav-link-modern.active .mud-icon-root {
        color: #64b5f6 !important;
    }


/* ============================================================
   13) دیالوگ پرسنل مدرن
   ============================================================ */

/* هدر دیالوگ */
.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #0a2540 0%, #1565c0 100%);
    border-radius: 8px 8px 0 0;
}

.dialog-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

/* بخش‌های فرم */
.form-section {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
}

.form-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--mud-palette-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--mud-palette-lines-default);
}

/* حالت خالی */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    background: var(--mud-palette-background);
    border-radius: 12px;
    border: 2px dashed var(--mud-palette-lines-default);
}

/* بخش آپلود عکس */
.photo-upload-section {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 16px;
}

.photo-preview {
    flex-shrink: 0;
}

.photo-preview-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--mud-palette-primary);
    box-shadow: 0 6px 16px rgba(10, 37, 64, 0.25);
}

.photo-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--mud-palette-background);
    border: 3px dashed var(--mud-palette-lines-default);
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-upload-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.photo-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    border: 2px dashed var(--mud-palette-primary);
    border-radius: 12px;
    background: rgba(21, 101, 192, 0.04);
    cursor: pointer;
    transition: background 0.2s;
    color: var(--mud-palette-primary);
    font-size: 13px;
    font-weight: 500;
}

    .photo-upload-label:hover {
        background: rgba(21, 101, 192, 0.1);
    }

    .photo-upload-label input[type="file"] {
        display: none;
    }

/* دارک‌مود */
.mud-theme-dark .form-section {
    background: var(--mud-palette-surface);
    border-color: rgba(255,255,255,0.1);
}

.mud-theme-dark .photo-upload-label {
    background: rgba(100, 181, 246, 0.08);
}

    .mud-theme-dark .photo-upload-label:hover {
        background: rgba(100, 181, 246, 0.15);
    }
/* ============================================================
   15) هدر دیالوگ و دکمهٔ Close سفارشی
   ============================================================ */

/* هدر گرادیانی */
.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #0a2540 0%, #1565c0 100%);
    border-radius: 8px 8px 0 0;
    position: relative;
}

/* آیکون داخل هدر */
.dialog-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

/* دکمهٔ Close سفارشی */
.dialog-close-btn {
    color: white !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s, transform 0.15s !important;
}

    .dialog-close-btn:hover {
        background: rgba(255, 255, 255, 0.32) !important;
        transform: scale(1.08);
    }

    .dialog-close-btn .mud-icon-root {
        color: white !important;
        font-size: 20px !important;
    }

/* حذف حاشیهٔ پیش‌فرض TitleContent که MudBlazor اضافه می‌کند */
.mud-dialog-title {
    padding: 0 !important;
}

/* اگر با هدر سفارشی، فاصلهٔ بالای DialogContent زیاد بود */
.dialog-header + .mud-dialog-content,
.dialog-header ~ .mud-dialog-content {
    padding-top: 16px !important;
}
/* ============================================================
   16) فوتر ثابت دیالوگ پرسنل
   ============================================================ */

/* نوار فوتر */
.dialog-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 12px;
}

/* فوتر DialogActions */
.mud-dialog-actions {
    padding: 12px 24px !important;
    border-top: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    border-radius: 0 0 8px 8px;
    position: sticky;
    bottom: 0;
    z-index: 2;
}

/* دارک‌مود */
.mud-theme-dark .mud-dialog-actions {
    border-top-color: rgba(255,255,255,0.1);
}
/* ============================================================
   17) چیدمان فرم + پنل کناری خطا
   ============================================================ */

.dialog-content-with-errors {
    padding: 0 !important;
}

.form-errors-layout {
    display: flex;
    gap: 16px;
    padding: 16px;
    align-items: flex-start;
    min-height: 500px;
}

/* ستون اصلی (فرم) */
.form-errors-main {
    flex: 1;
    min-width: 0; /* اجازهٔ کوچک شدن در flex */
}

/* پنل کناری خطا */
.validation-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: rgba(239, 83, 80, 0.04);
    border: 1px solid rgba(239, 83, 80, 0.25);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 220px);
    position: sticky;
    top: 16px;
    box-shadow: 0 2px 8px rgba(239, 83, 80, 0.08);
    animation: slideInFromLeft 0.25s ease-out;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.validation-sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--mud-palette-error);
    font-weight: 600;
    font-size: 13px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(239, 83, 80, 0.2);
    margin-bottom: 10px;
    flex-shrink: 0;
}

.validation-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex: 1;
}

    .validation-sidebar-list li {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        font-size: 12.5px;
        color: var(--mud-palette-text-primary);
        padding: 8px 10px;
        margin-bottom: 6px;
        background: var(--mud-palette-surface);
        border-radius: 8px;
        border-right: 3px solid var(--mud-palette-error);
        line-height: 1.5;
        transition: background 0.15s;
    }

        .validation-sidebar-list li:hover {
            background: rgba(239, 83, 80, 0.06);
        }

        .validation-sidebar-list li span {
            flex: 1;
            word-break: break-word;
        }

    /* اسکرول سفارشی */
    .validation-sidebar-list::-webkit-scrollbar {
        width: 5px;
    }

    .validation-sidebar-list::-webkit-scrollbar-thumb {
        background: rgba(239, 83, 80, 0.3);
        border-radius: 3px;
    }

/* حالت واکنش‌گرا: در موبایل/تبلت پنل به پایین می‌رود */
@media (max-width: 900px) {
    .form-errors-layout {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .validation-sidebar {
        width: 100%;
        max-height: 220px;
        position: static;
    }
}

/* دارک‌مود */
.mud-theme-dark .validation-sidebar {
    background: rgba(239, 83, 80, 0.08);
    border-color: rgba(239, 83, 80, 0.3);
}

.mud-theme-dark .validation-sidebar-list li {
    background: rgba(255,255,255,0.04);
}

/* ============================================================
   18) حذف استایل پیش‌فرض ValidationSummary (اگر جایی استفاده می‌شود)
   ============================================================ */
.validation-summary-valid {
    display: none;
}
/* ============================================================
   19) داشبورد: کارت‌های KPI مدرن
   ============================================================ */

.kpi-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 1400px) {
    .kpi-dashboard-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .kpi-dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.kpi-dashboard-card {
    border-radius: 14px;
    padding: 14px 12px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 118px;
    position: relative;
}

    .kpi-dashboard-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 18px rgba(0,0,0,0.12);
    }

.kpi-dashboard-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.7);
    margin-bottom: 8px;
}

.kpi-dashboard-value {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.kpi-dashboard-label {
    font-size: 11.5px;
    margin-top: 4px;
    opacity: 0.85;
    font-weight: 500;
}

/* دارک‌مود */
.mud-theme-dark .kpi-dashboard-card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.mud-theme-dark .kpi-dashboard-icon {
    background: rgba(255,255,255,0.15);
}

/* ============================================================
   20) گرید کارت کشتی‌ها (همه در یک نگاه)
   ============================================================ */

.ships-card-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

/* واکنش‌گرا */
@media (max-width: 1400px) {
    .ships-card-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .ships-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .ships-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.ship-card {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--mud-palette-surface);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 112px;
}

    .ship-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 18px rgba(0,0,0,0.12);
        border-color: rgba(10,37,64,0.2);
    }

    .ship-card.active {
        border-color: #1565c0;
        background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
        box-shadow: 0 6px 16px rgba(21,101,192,0.25);
    }

.ship-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ship-card-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(21,101,192,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1565c0;
    flex-shrink: 0;
}

.ship-card.active .ship-card-icon {
    background: rgba(21,101,192,0.2);
}

.ship-card-name {
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--mud-palette-text-primary);
    line-height: 1.2;
}

.ship-card-stats {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--mud-palette-text-secondary);
    font-weight: 500;
}

.ship-card-bar {
    height: 5px;
    background: rgba(0,0,0,0.06);
    border-radius: 3px;
    overflow: hidden;
}

.ship-card-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}

.ship-card-imo {
    opacity: 0.6;
    font-size: 10.5px !important;
    margin-top: auto;
}

/* دارک‌مود */
.mud-theme-dark .ship-card {
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

    .mud-theme-dark .ship-card:hover {
        box-shadow: 0 8px 18px rgba(0,0,0,0.45);
    }

    .mud-theme-dark .ship-card.active {
        background: linear-gradient(135deg, rgba(33,150,243,0.2) 0%, rgba(21,101,192,0.3) 100%);
        border-color: #64b5f6;
    }

.mud-theme-dark .ship-card-icon {
    background: rgba(100,181,246,0.15);
    color: #64b5f6;
}