/* ڕێکخستنی گشتی */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* سەرپەڕە */
.header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.admin-header .logo-section {
    align-items: flex-start;
    text-align: right;
}

.logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #667eea;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.header h1 {
    color: #4a5568;
    font-size: 2.5rem;
    margin: 0;
    font-weight: 700;
}

.header p {
    color: #718096;
    font-size: 1.2rem;
    margin: 5px 0 0 0;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-count {
    background: #667eea;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
}

/* فۆرم */
.main-content {
    margin-bottom: 30px;
}

.form-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
    font-size: 1.1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.error-message {
    color: #e53e3e;
    font-size: 0.9rem;
    margin-top: 5px;
    display: block;
}

/* دوگمەکان */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* ئاگادارکردنەوەکان */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.alert-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.alert-error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

.icon {
    font-size: 1.2rem;
}

/* پەڕەی ئەدمین */
.admin-content {
    margin-top: 30px;
}

.empty-state {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 60px 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.empty-state .icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
}

.empty-state h3 {
    font-size: 1.8rem;
    color: #4a5568;
    margin-bottom: 10px;
}

.empty-state p {
    color: #718096;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.user-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.user-header h3 {
    color: #4a5568;
    font-size: 1.3rem;
    margin: 0;
}

.user-actions {
    display: flex;
    gap: 10px;
}

.btn-edit, .btn-delete {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #e6fffa;
    color: #285e61;
}

.btn-edit:hover {
    background: #b2f5ea;
    transform: scale(1.1);
}

.btn-delete {
    background: #fed7d7;
    color: #742a2a;
}

.btn-delete:hover {
    background: #fc8181;
    transform: scale(1.1);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-item .label {
    font-weight: 600;
    color: #4a5568;
    min-width: 100px;
}

.info-item .value {
    color: #718096;
    flex: 1;
}

.info-item .value a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.info-item .value a:hover {
    text-decoration: underline;
}

/* مۆدڵ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    left: 20px;
}

.close:hover {
    color: #000;
}

.modal-content h2 {
    margin-bottom: 25px;
    color: #4a5568;
    text-align: center;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

/* پێپەڕ */
.footer {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.footer p {
    color: #718096;
    margin: 0;
}

/* ڕێسپۆنسیڤ */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .admin-actions {
        flex-direction: column;
    }
    
    .form-container {
        padding: 25px;
    }
    
    .users-grid {
        grid-template-columns: 1fr;
    }
    
    .user-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}

/* ئەنیمەیشن */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-card {
    animation: fadeIn 0.5s ease-out;
}

.form-container {
    animation: fadeIn 0.6s ease-out;
}

.header {
    animation: fadeIn 0.4s ease-out;
}


/* ستایلی تایبەت بۆ پەیامی دووبارەکردنەوە */
.alert-error strong {
    color: #742a2a;
    font-weight: bold;
}

.alert-error br {
    margin: 5px 0;
}

/* ستایلی فۆرمی داخڵبوون */
.login-form {
    max-width: 400px;
    margin: 0 auto;
}

/* ستایلی دوگمەی دەرچوون */
.btn-delete {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

.btn-delete:hover {
    background: #fc8181;
    color: white;
    transform: translateY(-2px);
}

/* ستایلی تایبەت بۆ نیشاندانی کاتەکان */
.info-item .value {
    font-family: 'Courier New', monospace;
}

/* ئەنیمەیشنی تایبەت بۆ پەیامی هەڵە */
.alert-error {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ستایلی بۆ فۆکەس کردن لە پاسۆرد فیلد */
input[type="password"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    background: #fff;
}

/* ئایکۆنی 🔐 لە دوگمەی داخڵبوون */
.submit-btn .icon {
    transition: transform 0.3s ease;
}

.submit-btn:hover .icon {
    transform: rotate(15deg);
}