:root {
    --primary-purple: #6f42c1;
    --dark-purple: #5a32a8;
    --white: #ffffff;
    --text-dark: #212121;
    --card-bg: rgba(255, 255, 255, 0.15);
    --card-border: rgba(255, 255, 255, 0.2);
}

/* تغییرات اصلی برای مودال‌ها */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    text-align: center;
    direction: rtl; /* اضافه کردن جهت راست به چپ */
}

.scanner-box {
    position: relative;
    width: 95%;
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}
.action-title {
    color: #ffffff;
}

.manual-entry-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    text-align: center;
    direction: rtl; /* اضافه کردن جهت راست به چپ */
}

.manual-entry-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    margin: 0 auto; /* مرکز کردن افقی */
}

/* بقیه استایل‌ها بدون تغییر باقی می‌مانند */
.action-button {
    border-radius: 28px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
    width: 100%;
    border: 1px solid var(--primary-purple);
}

.primary-button {
    background-color: var(--primary-purple);
    color: var(--white);
}

.success-button,
.danger-button {
    background-color: var(--white);
    color: var(--primary-purple);
}

.primary-button:hover {
    background-color: var(--white);
    color: var(--primary-purple);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.25);
}

.success-button:hover,
.danger-button:hover {
    background-color: var(--primary-purple);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.25);
}

body {
    font-family: 'Vazir', 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: url('https://aftab.wedo-app.ir/images/index/moon.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-dark);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    filter: blur(5px);
    z-index: -1;
}

.main-container {
    max-width: 100%;
    padding: 20px;
    backdrop-filter: blur(3px);
}

.card-style {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid var(--card-border);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-style:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
    border: 3px solid var(--primary-purple);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--white);
}

.profile-detail {
    font-size: 0.95rem;
    color: rgba(255,255,255, 0.85);
    margin-bottom: 8px;
}

.profile-id {
    background-color: var(--primary-purple);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-block;
    margin-top: 15px;
    font-weight: 500;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 20px;
    background-color: rgba(128,128,128, 0.15);
    color: var(--white);
    margin-bottom: 20px;
    font-weight: 500;
}

#scanner-video {
    width: 100%;
    border-radius: 12px;
    background: #000;
}

.scanner-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    max-width: 280px;
    max-height: 280px;
    border: 3px solid var(--primary-purple);
    border-radius: 12px;
    box-shadow: 0 0 0 10000px rgba(0, 0, 0, 0.7);
    animation: scanner-pulse 2s infinite;
}

@keyframes scanner-pulse {
    0% { border-color: rgba(111, 66, 193, 0.7); }
    50% { border-color: rgba(111, 66, 193, 0.3); }
    100% { border-color: rgba(111, 66, 193, 0.7); }
}

.scanner-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.flash-toggle {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    background: rgba(111, 66, 193, 0.7);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state {
    text-align: center;
    padding: 25px;
    color: rgba(255,255,255, 0.7);
}

.empty-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    color: rgba(255,255,255, 0.8);
}

.notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(33, 33, 33, 0.9);
    color: white;
    padding: 14px 28px;
    border-radius: 28px;
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.3s ease;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.notification.show {
    opacity: 1;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.manual-entry-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text-dark);
    text-align: center;
}

.manual-entry-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 20px;
    text-align: center;
}

.manual-entry-buttons {
    display: flex;
    gap: 10px;
    justify-content: center; /* اضافه شده برای مرکز کردن دکمه‌ها */
}

@media (max-width: 576px) {
    .main-container {
        padding: 15px;
    }

    .card-style {
        padding: 18px;
    }

    .action-button {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .attendance-actions {
        display: flex;
        flex-direction: column;
    }

    .attendance-actions .action-button {
        width: 100%;
        margin: 8px 0;
    }

    .manual-entry-buttons {
        flex-direction: column;
    }
}

@font-face {
    font-family: 'Vazir';
    src: url('https://aftab.wedo-app.ir/fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

.action-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #cccccc !important;
    color: #666666 !important;
    border-color: #cccccc !important;
}

#check-in-btn:not(:disabled) {
    background-color: var(--white);
    color: var(--primary-purple);
    border-color: var(--primary-purple);
}

#check-out-btn:not(:disabled) {
    background-color: var(--primary-purple);
    color: var(--white);
    border-color: var(--primary-purple);
}
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    direction: rtl;
}

.login-modal-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.login-modal-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-modal-text {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
}

.login-modal-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 20px;
    text-align: center;
}

.login-modal-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.verification-code-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
    direction: ltr;
}
/* برای محیط RTL */
[dir="ltr"] .verification-code-container {
    direction: ltr; /* اجبار به جهت‌دهی چپ به راست */
}

.verification-code-input {
    width: 60px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #6f42c1; /* رنگ متن بنفش */
    border: 2px solid #e0e0e0;
    border-radius: 15px; /* گوشه‌های گرد */
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

.verification-code-input:focus {
    border-color: #6f42c1; /* رنگ حاشیه بنفش */
    outline: none;
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.2);
    background-color: #fff;
    transform: scale(1.05);
}

.verification-code-input.filled {
    border-color: #6f42c1;
    background-color: #f5f0ff;
}

/* استایل برای حالت موبایل */
@media (max-width: 480px) {
    .verification-code-input {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

.resend-code-text {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #666;
}

.resend-code-text a {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 500;
}

.resend-code-text a:hover {
    text-decoration: underline;
}

.global-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background-color: rgba(245, 245, 245, 0.2);
    border-top: 1px solid #ddd;
    z-index: 1000;
}

.user-info {
    font-size: 14px;
    color: #555;
}

.copyright-text {
    font-size: 12px;
    color: #777;
    margin: 0 auto;
}

.logout-mini-button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-mini-button:hover {
    background-color: rgba(255, 0, 0, 0.1);
    color: #ff4081;
}