/* ================= RESET ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Tahoma, Arial, sans-serif;
}

body {
    background-color: #f2f2f2;
    direction: rtl;
    padding-top: 80px; /* جا برای نوار ثابت */
    padding-bottom: 100px;
}

/* ================= TOP BAR ================= */

.top-bar {
    width: 100%;
    height: 72px;
    background: #000;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 9999;
}

/* ===== Logo (Left) ===== */
.logo img {
    height: 50px;
    display: block;
}

/* ===== Right Section ===== */
.right-section {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* ===== User Block ===== */
.user-block {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-icon {
    width: 34px;
    height: 34px;
    cursor: pointer;
}

.user-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: right;
    gap: 4px;
}

.user-name {
    font-size: 13px;
    font-weight: bold;
}

.user-unit {
    font-size: 12px;
    opacity: 0.8;
}

/* ===== Language Flags ===== */
.lang-switch {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 2px;
}

.flag {
    width: 26px;
    height: 18px;
    border-radius: 4px;
    cursor: pointer;
}

/* ===== Dropdown ===== */
.dropdown {
    display: none;
    position: fixed;
    top: 72px;
    right: 12px;
    background: #111;
    border-radius: 8px;
    min-width: 170px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0,0,0,.3);
    z-index: 10000;
}

.dropdown a,
.dropdown p {
    display: block;
    padding: 10px;
    color: white;
    text-decoration: none;
}


.dropdown a:hover {
    background: #222;
}

.username {
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,.15);
}

/* ================= CONTAINERS ================= */

.container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* ================= LOGIN BOX ================= */

.login-box {
    width: 360px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
}

/* Header */
.login-header {
    background: #0b1f3a;
    color: white;
    padding: 14px;
    text-align: center;
    font-size: 14px;
}

/* Body */
.login-body {
    padding: 18px;

}

.login-body input,
.login-body textarea,
.login-body select {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.login-body button {
    width: 100%;
    padding: 12px;
    background: #0b1f3a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
}

.login-body button:hover {
    background: #132d52;
}

/* ================= CARDS ================= */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 20px auto;
    padding: 0 16px; /* فاصله از چپ و راست */
}

.card {
    background: white;
    border-radius: 14px;
    padding: 22px 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    transition: .25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    /* min-height: 180px; */
    height: 180px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 22px rgba(0,0,0,.15);
}

.card img {
    width: 64px;

    height: 64px;
    object-fit: contain;


    display: block;
    margin: 0 auto;
}

.card span {
    display: block;
    text-align: center;
    font-weight: bold;
    color: #1f2a44;
}

/* ================= FORM BOX ================= */

.form-box {
    width: 95%;
    max-width: 900px;
    margin: auto;
    background: white;
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0,0,0,.08);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-box label {
    font-weight: bold;
    margin-bottom: 4px;
    display: block;
}

.form-box input,
.form-box textarea,
.form-box select {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* ================= LIST BOX ================= */

.list-box {
    border: 1px solid #ccc;
    height: 160px;
    overflow: auto;
    padding: 4px;
    border-radius: 6px;
    background: white;
}

.list-box div {
    padding: 6px;
    cursor: pointer;
}

.list-box div:hover {
    background: #e9f2ff;
}

/* ================= ALERTS ================= */

.error {
    color: red;
    text-align: center;
    font-size: 13px;
}

.alert-success {
    background: #e9f7ef;
    color: #155724;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1px solid #c3e6cb;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {

    .top-bar {
        height: 64px;
        padding: 0 12px;
    }

    .logo img {
        height: 44px;
    }

    .user-name {
        font-size: 12px;
    }

    .user-unit {
        font-size: 11px;
    }

    .container {
        padding: 0 12px;
    }

    .login-box {
        width: 100%;
        max-width: 420px;
    }

    body {
        padding-bottom: 100px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }
}


.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background-color: #1a1a1a;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
    z-index: 9999; 
}

.nav-item {
    text-decoration: none;
    color: #ffffff; /* نوشته‌های سفید در صورت فعال کردن */
    flex: 1;
    text-align: center;
}

.nav-item-center {
    position: relative;
    /* width: 50px;
    height: 50px; */
    margin-top: -12px; /* بالا آمدن دایره */
}

.center-button {
    width: 65px;
    height: 65px;
    background-color: #ffffff; /* رنگ پس‌زمینه دایره (خاکستری تیره) */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border: 4px solid #1a1a1a; /* هماهنگ با رنگ نوار اصلی */
    transition: all 0.2s ease-in-out;
}

.center-button:active {
    transform: scale(0.9);
    background-color: #444444;
}


/* استایل برای نوشته‌ها در صورتی که بعداً کامنت را باز کنی */
.nav-text {
    font-size: 16px;
    font-weight: bold;
    color: white;
    display: block;
    margin-top: 5px;
}