:root {
    --primary-color: #4a90e2;
    --secondary-color: #f5f6fa;
    --text-color: #2f3640;
    --error-color: #e74c3c;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--secondary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--text-color);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background-color: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
}

h2 {
    margin-bottom: 30px;
    color: var(--primary-color);
}

.input-group {
    margin-bottom: 20px;
    text-align: right;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

input {
    width: 100%;
    padding: 12px;
    border: 1px solid #dcdde1;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus {
    border-color: var(--primary-color);
    outline: none;
}

button {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #357abd;
}

button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.error-message {
    color: var(--error-color);
    margin-bottom: 15px;
    font-size: 14px;
    min-height: 20px;
}

/* Dashboard Styles */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

.dashboard-header {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-content {
    flex-grow: 1;
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.user-welcome h2 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.5em;
}

.badge {
    background-color: var(--secondary-color);
    color: var(--text-color);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    border: 1px solid #ddd;
}

.user-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9em;
}

.stat-value {
    font-weight: bold;
    color: var(--text-color);
}

.logout-btn {
    width: auto;
    background-color: var(--error-color);
    padding: 8px 20px;
    margin: 0;
}

.logout-btn:hover {
    background-color: #c0392b;
}

h1 {
    margin-bottom: 20px;
    color: var(--text-color);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    background-color: #f8f9fa;
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 1.1em;
    color: var(--primary-color);
    margin: 0;
}

.card-body {
    padding: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.divider {
    height: 1px;
    background-color: #eee;
    margin: 10px 0;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
    color: white;
}

.status-success {
    background-color: #27ae60;
}

.status-error {
    background-color: #e74c3c;
}

.status-pending {
    background-color: #f1c40f;
    color: #2c3e50;
}

.note-box {
    background-color: #fff9c4;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 0.9em;
}

.loading {
    text-align: center;
    font-size: 1.2em;
    color: var(--primary-color);
    margin: 40px 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        padding: 15px;
        text-align: center;
    }

    .header-content {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .user-welcome {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 10px;
        margin-bottom: 15px;
        padding-bottom: 15px;
        border-bottom: 1px solid #eee;
    }

    .user-stats {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .stat-item {
        justify-content: space-between;
        background-color: #f8f9fa;
        padding: 10px 15px;
        border-radius: 8px;
        width: 100%;
    }

    .logout-btn {
        width: 100%;
        margin-top: 10px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .status-badge {
        align-self: flex-start;
    }

    .info-row {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }

    .info-row span:last-child {
        font-weight: bold;
    }
}