* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: #f5f5f5;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* هدر */
header {
    background: linear-gradient(135deg, #004d40, #00695c);
    color: #fff;
    padding: 16px 20px;
    box-shadow: 0 2px 12px rgba(0, 77, 64, 0.25);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    gap: 8px;
}

.logo img {
    height: 55px;
    width: auto;
    background-color: #ffffff;
    border-radius: 8px;

}

.logo-placeholder {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.company-title {
    font-size: 1.25rem;
    font-weight: 700;
}

/* نوار ناوبری */
nav {
    background: #fff;
    padding: 12px 20px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.nav-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.nav-links a {
    color: #00695c;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.nav-links a:hover {
    background: rgba(0, 105, 92, 0.1);
    color: #004d40;
}

.nav-group {
    display: flex;
    gap: 12px;
    padding-right: 20px;
    border-right: 1px solid #e0e0e0;
}

.nav-group a {
    font-size: 0.9rem;
    color: #555;
}

@media (max-width: 768px) {
    .nav-group {
        border-right: none;
        padding-right: 0;
    }
}

/* بدنه */
main {
    flex: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    width: 100%;
}

.intro {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    text-align: center;
}

.intro h1 {
    color: #004d40;
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.intro p {
    line-height: 2;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
}

.body-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.body-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
    color: #00695c;
    text-decoration: none;
    display: block;
}

.body-section:hover {
    box-shadow: 0 4px 24px rgba(0,105,92,0.15);
    transform: translateY(-2px);
    color: #004d40;
}

.body-section-title {
    font-weight: 600;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 8px;
}

.body-section p {
    margin: 0;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.6;
}

.body-section:hover p {
    color: #555;
}

/* فوتر */
footer {
    background: linear-gradient(135deg, #004d40, #00695c);
    color: #fff;
    padding: 24px 20px;
    margin-top: auto;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    flex-direction: row-reverse;
}

.footer-info {
    text-align: right;
}

.footer-info .address,
.footer-info .phone {
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-info .phone a {
    color: #b2ebf2;
    text-decoration: none;
    border-bottom: 1px dashed rgba(178, 235, 242, 0.6);
}

.footer-info .phone a:hover {
    color: #e0f7fa;
}

.footer-info .label {
    font-weight: 600;
    color: #e0f2f1;
    margin-left: 6px;
}

.badge-wrap {
    text-align: left;
}

.badge-wrap a {
    display: inline-block;
    background-color: #ffffff;
    padding: 4px;
    border-radius: 8px;
}

.badge-wrap img {
    max-width: 120px;
    height: auto;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding-top: 16px;
    margin-top: 20px;
    font-size: 0.85rem;
    text-align: center;
    color: #e0f2f1;
}

.footer-bottom a {
    color: #80deea;
    text-decoration: none;
    border-bottom: 1px dashed rgba(128, 222, 234, 0.7);
}

.footer-bottom a:hover {
    color: #b2ebf2;
}

@media (max-width: 640px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-info {
        text-align: center;
    }
    .badge-wrap {
        text-align: center;
    }
}

/* استایل‌های صفحه u/index.php (از u/0.css) */
.container {
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.container h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}

.user-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.info-card {
    background-color: #f9f9f9;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.info-card h3 {
    margin-top: 0;
    color: #3498db;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 10px;
}

.status-indicator {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    color: white;
}

.status-active {
    background-color: #2ecc71;
}

.status-inactive {
    background-color: #e74c3c;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.btn {
    margin-bottom: 30px;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.btn-login {
    background-color: #2ecc71;
    color: white;
}

.btn-logout {
    background-color: red;
    color: white;
}

.btn-login:hover {
    background-color: #27ae60;
}

.btn-logout:hover {
    background-color: #c0392b;
}

.btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.logout-all {
    display: block;
    text-align: center;
    margin-top: 30px;
}

.logout-link {
    color: #7f8c8d;
    text-decoration: none;
    font-size: 14px;
}

.logout-link:hover {
    text-decoration: underline;
}

.bottom-bar {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    background-color: green;
    color: white;
    text-align: center;
    padding: 15px;
    font-size: 0.9rem;
    z-index: 1000;
    transition: background 0.3s;
}

.bottom-bar a {
    color: #B2EBF2;
    text-decoration: none;
    font-weight: bold;
}

.bottom-bar a:hover {
    text-decoration: underline;
}

/* دکمه افزایش اعتبار */
.btn-credit {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 300px;
    display: inline-block;
    white-space: nowrap;
}

.btn-credit:hover {
    background-color: #2980b9;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.btn-credit:active {
    transform: scale(0.97);
}

/* مرکزچین کردن مقدار داخل info-value */
.info-value {
    font-size: 18px;
    font-weight: bold;
    margin-top: 10px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 600px) {
    .user-info {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* استایل‌های صفحه scan.php */
.scan-container {
    max-width: 800px;
    margin: 20px auto 40px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    width: 95%;
    text-align: center;
}

.scan-container h2 {
    color: #00695c;
    font-size: 1.4rem;
    border-bottom: 2px solid #009688;
    padding-bottom: 8px;
    margin-top: 0;
}

.scan-container p {
    font-size: 1em;
    line-height: 1.6em;
    text-align: justify;
}

.btn-login {
    display: block;
    margin: 25px auto;
    padding: 12px 25px;
    background-color: #009688;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    text-align: center;
    width: 80%;
    max-width: 250px;
    border: none;
    cursor: pointer;
}

.btn-login:hover {
    background-color: #00796b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.back-btn {
    display: inline-block;
    margin: 15px auto;
    padding: 10px 20px;
    background-color: #009688;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    transition: background 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.back-btn:hover {
    background-color: #00796b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* اسکنر */
#reader {
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
    display: none;
}

#result {
    text-align: center;
    margin: 20px 0;
    font-weight: bold;
    color: #00695c;
}

.login-box {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: auto auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 40px 30px;
    transition: all 0.3s ease;
}

.login-box::before,
.login-box::after {
    display: none; /* حذف افکت‌های قبلی */
}

.login-borderLine::before,
.login-borderLine::after {
    display: none; /* حذف افکت‌های قبلی */
}

.login-box form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-box form h2 {
    color: #333;
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.login-box form .inputBox {
    position: relative;
    width: 100%;
    margin-top: 10px;
}

.login-box form .inputBox input {
    width: 100%;
    padding: 15px 0 5px 0;
    font-size: 1rem;
    color: #333;
    border: none;
    border-bottom: 2px solid #ddd;
    outline: none;
    background: transparent;
    transition: border-color 0.3s;
}

.login-box form .inputBox input:focus,
.login-box form .inputBox input:valid {
    border-bottom-color: #4CAF50;
}

.login-box form .inputBox span {
    position: absolute;
    right: 0;
    top: 15px;
    color: #aaa;
    font-size: 1rem;
    pointer-events: none;
    transition: 0.3s;
}

.login-box form .inputBox input:focus ~ span,
.login-box form .inputBox input:valid ~ span {
    transform: translateY(-25px);
    font-size: 0.85rem;
    color: #4CAF50;
}

.login-box form .inputBox i {
    display: none; /* خط زیرین با border-bottom مدیریت می‌شود */
}

.login-box form .links {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    font-size: 0.9rem;
}

.login-box form .links a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.login-box form .links a:hover {
    color: #4CAF50;
}

.login-box #submit {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: #fff;
    border: none;
    padding: 14px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.login-box #submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.4);
}

.login-box #submit:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
}

/* ریسپانسیو برای موبایل */
@media (max-width: 480px) {
    .login-box {
        margin: 30px auto;
        padding: 30px 20px;
        max-width: 90%;
    }

    .login-box form h2 {
        font-size: 1.5rem;
    }
}