/* فونت و پس‌زمینه */
body {
    font-family: "Vazir", sans-serif;
    background: #f1f5f9;
    margin: 0;
    padding: 0;
    overflow: auto; /* ✅ اجازه اسکرول به صفحه */
}

/* هدر */
header {
    background: #021323;
    color: #fff;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* کارت‌ها */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

/* عناوین */
h1, h2, h3 {
    color: #1a73e8;
    margin: 10px 0;
}

/* فرم‌ها */
input, select, textarea, button {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-sizing: border-box;
    font-size: 14px;
    transition: 0.3s;
}

input:focus, select:focus, textarea:focus {
    border-color: #1a73e8;
    outline: none;
    box-shadow: 0 0 5px rgba(26,115,232,0.3);
}

button {
    background: #1a73e8;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    font-size: 16px;
}

button:hover {
    background: #155ab6;
}

/* لینک‌ها */
a {
    color: #1a73e8;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* پیام موفقیت/خطا */
.message { color: green; text-align: center; margin-bottom: 10px; }
.error { color: red; text-align: center; margin-bottom: 10px; }

/* 🎨 فرم فیلتر */
.filter-form {
    margin: 20px 0;
    padding: 15px;
    background: #f8faff;
    border: 1px solid #dce7ff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    align-items: center;
}

.filter-form input,
.filter-form select {
    padding: 10px;
    border: 1px solid #ccd9ff;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.filter-form input:focus,
.filter-form select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 4px rgba(0,102,204,0.3);
}

/* دکمه‌ها */
.btn-search,
.btn-reset {
    padding: 10px;
    text-align: center;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: block;
}

.btn-search {
    background: #0066cc;
    color: #fff;
    border: none;
}

.btn-search:hover {
    background: #004c99;
}

.btn-reset {
    background: #f1f1f1;
    color: #333;
    text-decoration: none;
}

.btn-reset:hover {
    background: #ddd;
}

/* کانتینر اصلی صفحه */
.container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px;
    box-sizing: border-box;
}

/* جدول داخل محدوده */
.table-container {
    max-height: 400px; /* ارتفاع جدول */
    overflow-y: auto;  /* ✅ فقط جدول اسکرول میخوره */
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* برای جلوگیری از شکستن جدول */
}

table th, table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

th {
    background: #f0f4f8;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    table, thead, tbody, th, td, tr {
        display: block;
        width: 100%;
    }

    thead { display: none; }

    tr {
        margin-bottom: 10px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 10px;
        background: #fafafa;
    }

    td {
        text-align: right;
        padding-left: 50%;
        position: relative;
    }

    td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: bold;
    }
}


/*newindex*/
body {
    font-family: "IRANSans", "Inter", sans-serif;
    margin: 0;
    padding: 0;
}

/* رپر که کل صفحه را می‌گیرد */
.ui-wrapper {
    width: 100%;
    height: 100vh;
}

/* کارت اصلی */
.ui-card {
    width: 100%;
    max-width: 380px;
    min-height: 600px;
    background: linear-gradient(180deg, #0070ff, #0059e0);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* موج‌های پس‌زمینه */
.ui-card::before,
.ui-card::after {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    z-index: 0;
}

.ui-card::before {
    width: 450px;
    height: 450px;
    top: -220px;
    left: -160px;
}

.ui-card::after {
    width: 500px;
    height: 500px;
    bottom: -260px;
    right: -180px;
}

h2, p, .btn, .fw-bold {
    position: relative;
    z-index: 2;
}

/* کاملاً وسط در موبایل */
@media (max-width: 576px) {
    .ui-wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0 !important;
    }

    .ui-card {
        max-width: 90%;
        min-height: 70vh;   /* ← اضافه شد: حداقل ۷۰٪ ارتفاع صفحه */
        padding-top: 40px;
        padding-bottom: 40px;
        border-radius: 20px !important;
    }
}
