/* style.css - به‌روز شده با ریسپانسیو کامل */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    direction: rtl;
    font-weight: 400;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    position: relative;
}

/* هدر */
header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
}

header h1 {
    color: #4a47a3;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 900;
    letter-spacing: -1px;
}

header p {
    color: #666;
    font-size: 1.1em;
    font-weight: 300;
}

/* بخش جستجو */
.search-section {
    margin-bottom: 30px;
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border-radius: 50px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
    padding: 0 20px;
}

.search-box:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
}

.search-box input {
    flex: 1;
    padding: 15px 0;
    border: none;
    outline: none;
    font-size: 1.1em;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 400;
    background: transparent;
    min-height: 50px;
}

.search-box input::placeholder {
    font-weight: 300;
    color: #aaa;
}

.loader {
    font-size: 1.2em;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.search-status {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9em;
    color: #888;
    min-height: 25px;
}

/* لیست رشته‌ها */
.skills-list {
    margin-bottom: 30px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.skill-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-radius: 12px;
    border: 2px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    min-height: 55px;
    touch-action: manipulation;
}

.skill-item:active {
    transform: scale(0.97);
    background: #f8f9fa;
}

.skill-item:hover {
    transform: translateX(-5px);
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.skill-icon {
    font-size: 1.3em;
    margin-left: 12px;
    flex-shrink: 0;
}

.skill-title {
    flex: 1;
    font-size: 1.05em;
    font-weight: 500;
    color: #333;
    word-break: break-word;
}

.skill-arrow {
    color: #ccc;
    font-size: 1.2em;
    transition: all 0.3s;
    flex-shrink: 0;
    margin-right: 10px;
}

.skill-item:hover .skill-arrow {
    color: #667eea;
    transform: translateX(-5px);
}

/* آیتم بدون نتیجه */
.no-result {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 1.1em;
}

.no-result span {
    display: block;
    font-size: 3em;
    margin-bottom: 10px;
}

/* بخش جزئیات */
.details-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 0;
    margin-top: 20px;
    overflow: hidden;
    animation: slideUp 0.4s ease;
    border: 2px solid #e0e0e0;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 70px;
}

.details-header h2 {
    font-weight: 700;
    font-size: 1.5em;
    margin: 0;
    word-break: break-word;
    flex: 1;
    padding-left: 15px;
}

.close-details {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 1.5em;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    touch-action: manipulation;
}

.close-details:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.close-details:active {
    transform: scale(0.9);
}

.details-content {
    padding: 25px;
}

.detail-field {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.detail-field:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-field label {
    display: block;
    font-weight: 700;
    color: #4a47a3;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.detail-field .content {
    color: #444;
    line-height: 2;
    background: white;
    padding: 12px 15px;
    border-radius: 8px;
    border-right: 4px solid #667eea;
    white-space: pre-wrap;
    font-weight: 400;
    position: relative;
}

.copy-btn-detail {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8em;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    transition: all 0.3s;
    margin-top: 8px;
    touch-action: manipulation;
}

.copy-btn-detail:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.copy-btn-detail:active {
    transform: scale(0.95);
}

.copy-btn-detail.copied {
    background: #28a745;
}

.detail-copy-all {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed #e0e0e0;
}

.detail-copy-all button {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    touch-action: manipulation;
}

.detail-copy-all button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(245, 87, 108, 0.4);
}

.detail-copy-all button:active {
    transform: scale(0.95);
}

/* دکمه بازگشت به بالا */
#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5em;
    cursor: pointer;
    display: none;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
    z-index: 1000;
    touch-action: manipulation;
}

#scrollTopBtn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
}

#scrollTopBtn:active {
    transform: scale(0.9);
}

/* مدال کپی */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    margin: 20% auto;
    padding: 20px;
    border-radius: 15px;
    max-width: 400px;
    text-align: center;
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    left: 15px;
    top: 10px;
    font-size: 1.5em;
    cursor: pointer;
    color: #888;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-content p {
    font-size: 1.2em;
    color: #28a745;
    padding: 20px 0;
}

/* ================================================ */
/* ============ بخش مدیریت (ادمین) ============ */
/* ================================================ */

/* فرم‌های ادمین */
.admin-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    overflow: hidden;
}

.admin-form h2 {
    font-weight: 700;
    color: #4a47a3;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 700;
    color: #4a47a3;
    margin-bottom: 5px;
    font-size: 0.95em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 400;
    background: white;
    -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group small {
    color: #888;
    font-size: 0.85em;
    font-weight: 300;
    display: block;
    margin-top: 4px;
}

.admin-form button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 25px;
    font-size: 1.05em;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    touch-action: manipulation;
    width: auto;
}

.admin-form button:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.admin-form button:active {
    transform: scale(0.97);
}

.cancel-btn {
    display: inline-block;
    background: #dc3545;
    color: white;
    padding: 12px 35px;
    border-radius: 25px;
    text-decoration: none;
    margin-right: 10px;
    transition: all 0.3s;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
}

.cancel-btn:hover {
    background: #c82333;
    transform: scale(1.03);
}

.cancel-btn:active {
    transform: scale(0.97);
}

/* جدول مدیریت */
.admin-list {
    overflow-x: auto;
    margin-top: 20px;
}

.admin-list h2 {
    font-weight: 700;
    color: #4a47a3;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-list table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.admin-list th {
    background: #4a47a3;
    color: white;
    padding: 12px 15px;
    text-align: right;
    font-weight: 700;
    font-size: 0.9em;
    white-space: nowrap;
}

.admin-list td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 400;
    font-size: 0.9em;
    vertical-align: middle;
}

.admin-list tr:hover {
    background: #f8f9fa;
}

.edit-btn {
    color: #667eea;
    text-decoration: none;
    font-size: 1.2em;
    margin: 0 3px;
    padding: 5px 8px;
    border-radius: 5px;
    transition: background 0.3s;
    display: inline-block;
}

.edit-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

.delete-btn {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 5px;
    transition: background 0.3s;
    font-family: 'Vazirmatn', sans-serif;
}

.delete-btn:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* دکمه خروج */
.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    touch-action: manipulation;
}

.logout-btn:hover {
    background: #c82333;
}

.logout-btn:active {
    transform: scale(0.95);
}

/* دکمه تغییر رمز */
.btn-change-pass {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    margin-left: 10px;
    font-size: 0.9em;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    transition: all 0.3s;
    touch-action: manipulation;
}

.btn-change-pass:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-change-pass:active {
    transform: scale(0.95);
}

/* لاگین */
.login-container {
    max-width: 400px;
    margin: 50px auto;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-container h2 {
    text-align: center;
    color: #4a47a3;
    margin-bottom: 25px;
    font-weight: 700;
}

.login-container input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 400;
    -webkit-appearance: none;
}

.login-container input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-container input::placeholder {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 300;
}

.login-container button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    touch-action: manipulation;
}

.login-container button:active {
    transform: scale(0.98);
}

/* پیام‌ها */
.success {
    background: #d4edda;
    color: #155724;
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-right: 4px solid #28a745;
    font-weight: 400;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-right: 4px solid #dc3545;
    font-weight: 400;
}

/* ================================================ */
/* ============ ریسپانسیو ============ */
/* ================================================ */

/* تبلت و موبایل بزرگ */
@media (max-width: 992px) {
    .container {
        padding: 20px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

/* موبایل */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 12px;
        border-radius: 12px;
    }
    
    header h1 {
        font-size: 1.5em;
    }
    
    header p {
        font-size: 0.95em;
    }
    
    .search-box {
        padding: 0 15px;
    }
    
    .search-box input {
        font-size: 1em;
        padding: 12px 0;
        min-height: 44px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .skill-item {
        padding: 12px 15px;
        min-height: 48px;
        border-radius: 10px;
    }
    
    .skill-title {
        font-size: 0.95em;
    }
    
    .skill-icon {
        font-size: 1.1em;
        margin-left: 10px;
    }
    
    .details-header {
        padding: 15px 18px;
        min-height: 60px;
    }
    
    .details-header h2 {
        font-size: 1.1em;
    }
    
    .close-details {
        width: 38px;
        height: 38px;
        font-size: 1.2em;
    }
    
    .details-content {
        padding: 15px;
    }
    
    .detail-field .content {
        padding: 10px 12px;
        font-size: 0.95em;
        line-height: 1.8;
    }
    
    .copy-btn-detail {
        display: block;
        width: 100%;
        text-align: center;
        padding: 8px;
        margin-top: 10px;
        font-size: 0.9em;
    }
    
    .detail-copy-all button {
        width: 100%;
        padding: 12px 20px;
        font-size: 0.95em;
    }
    
    #scrollTopBtn {
        bottom: 15px;
        left: 15px;
        width: 44px;
        height: 44px;
        font-size: 1.2em;
    }
    
    /* پنل ادمین */
    .admin-form {
        padding: 15px;
    }
    
    .admin-form h2 {
        font-size: 1.1em;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 0.95em;
        padding: 10px;
    }
    
    .admin-form button {
        width: 100%;
        padding: 12px;
        font-size: 1em;
    }
    
    .cancel-btn {
        width: 100%;
        text-align: center;
        margin-right: 0;
        margin-top: 8px;
        padding: 12px;
    }
    
    .admin-list table {
        min-width: 500px;
        font-size: 0.85em;
    }
    
    .admin-list th,
    .admin-list td {
        padding: 8px 10px;
    }
    
    .login-container {
        margin: 30px 15px;
        padding: 25px 20px;
    }
    
    .btn-change-pass {
        display: block;
        margin: 10px 0;
        text-align: center;
    }
    
    header {
        flex-direction: column;
        text-align: center;
    }
    
    header > div:last-child {
        margin-top: 10px;
        width: 100%;
    }
    
    .logout-btn {
        width: 100%;
        padding: 10px;
    }
}

/* موبایل بسیار کوچک */
@media (max-width: 400px) {
    header h1 {
        font-size: 1.3em;
    }
    
    .skill-item {
        padding: 10px 12px;
        min-height: 44px;
    }
    
    .skill-title {
        font-size: 0.9em;
    }
    
    .details-header {
        padding: 12px 15px;
    }
    
    .details-header h2 {
        font-size: 1em;
    }
    
    .modal-content {
        margin: 30% 15px;
        padding: 15px;
    }
}

/* ============ اسکرول بار ============ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a47a3;
}

/* ============ حالت خالی ============ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.empty-state span {
    font-size: 4em;
    display: block;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 1.1em;
}

/* ============ انیمیشن‌ها ============ */
.success, .error {
    animation: slideDown 0.5s ease;
}

/* بخش تغییر رمز */
#change-password {
    border-right: 4px solid #f5576c;
}

#change-password h2 {
    color: #f5576c;
}
/* ================================================ */
/* ============ استایل جدید ادمین ============ */
/* ================================================ */

/* هدر ادمین */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 0 20px 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 25px;
}

.admin-header h1 {
    font-size: 1.8em;
    color: #4a47a3;
    margin: 0;
    font-weight: 700;
}

.user-info {
    color: #666;
    font-size: 0.95em;
    margin: 5px 0 0 0;
}

.badge-super {
    background: #ffd700;
    color: #333;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.7em;
    display: inline-block;
    margin-right: 8px;
}

.header-right {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.btn-change-pass {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    transition: all 0.3s;
    touch-action: manipulation;
    white-space: nowrap;
}

.btn-change-pass:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-add {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    transition: all 0.3s;
    touch-action: manipulation;
    white-space: nowrap;
}

.btn-add:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.btn-logout {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    transition: all 0.3s;
    touch-action: manipulation;
    white-space: nowrap;
}

.btn-logout:hover {
    background: #c82333;
    transform: scale(1.03);
}

/* جدول رشته‌ها */
.skills-table-section {
    margin-top: 20px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.table-header h2 {
    font-size: 1.3em;
    color: #4a47a3;
    margin: 0;
    font-weight: 700;
}

.count-badge {
    background: #e9ecef;
    color: #495057;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.skills-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    background: white;
}

.skills-table thead {
    background: #4a47a3;
    color: white;
}

.skills-table th {
    padding: 14px 16px;
    text-align: right;
    font-weight: 700;
    font-size: 0.9em;
    white-space: nowrap;
}

.skills-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95em;
    vertical-align: middle;
}

.skills-table tbody tr:hover {
    background: #f8f9fa;
}

.skills-table tbody tr:last-child td {
    border-bottom: none;
}

.text-center {
    text-align: center;
}

.skill-title-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-icon {
    font-size: 1.2em;
}

.actions-cell {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-edit {
    color: #667eea;
    text-decoration: none;
    font-size: 0.85em;
    padding: 4px 12px;
    border-radius: 15px;
    border: 1px solid #667eea;
    transition: all 0.3s;
    display: inline-block;
    white-space: nowrap;
}

.btn-edit:hover {
    background: #667eea;
    color: white;
    transform: scale(1.03);
}

.btn-delete {
    background: none;
    border: 1px solid #dc3545;
    color: #dc3545;
    font-size: 0.85em;
    padding: 4px 12px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Vazirmatn', sans-serif;
    white-space: nowrap;
}

.btn-delete:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.03);
}

/* بخش ادمین‌ها */
.admins-section {
    margin-top: 35px;
    border-top: 2px solid #e0e0e0;
    padding-top: 30px;
}

.admins-table {
    width: 100%;
    min-width: 650px;
    border-collapse: collapse;
    background: white;
}

.admins-table thead {
    background: #6c757d;
    color: white;
}

.admins-table th {
    padding: 12px 16px;
    text-align: right;
    font-weight: 700;
    font-size: 0.9em;
    white-space: nowrap;
}

.admins-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9em;
    vertical-align: middle;
}

.admins-table tbody tr:hover {
    background: #f8f9fa;
}

.role-badge {
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 500;
    display: inline-block;
}

.role-super {
    background: #ffd700;
    color: #333;
}

.role-admin {
    background: #667eea;
    color: white;
}

/* ================================================ */
/* ============ مودال‌ها ============ */
/* ================================================ */

.modal-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    animation: modalFadeIn 0.3s ease;
    padding: 20px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-box {
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideDown 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes modalSlideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-small {
    max-width: 500px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3em;
    font-weight: 700;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5em;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-form {
    padding: 25px;
}

.modal-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.modal-form .form-group {
    margin-bottom: 18px;
}

.modal-form .form-group label {
    display: block;
    font-weight: 700;
    color: #4a47a3;
    margin-bottom: 6px;
    font-size: 0.95em;
}

.modal-form .form-group .required {
    color: #dc3545;
}

.modal-form .form-group input,
.modal-form .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95em;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 400;
    transition: all 0.3s;
    background: white;
}

.modal-form .form-group input:focus,
.modal-form .form-group textarea:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-form .form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.modal-form .form-group small {
    color: #888;
    font-size: 0.8em;
    display: block;
    margin-top: 4px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.btn-cancel {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95em;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    transition: all 0.3s;
    touch-action: manipulation;
}

.btn-cancel:hover {
    background: #5a6268;
    transform: scale(1.03);
}

.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 35px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95em;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    transition: all 0.3s;
    touch-action: manipulation;
}

.btn-submit:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

/* دکمه افزودن در حالت خالی */
.btn-add-empty {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    transition: all 0.3s;
    margin-top: 15px;
}

.btn-add-empty:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.4);
}

/* ================================================ */
/* ============ ریسپانسیو مودال‌ها ============ */
/* ================================================ */

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .header-right {
        justify-content: center;
    }
    
    .header-right button,
    .header-right .btn-change-pass,
    .header-right .btn-add,
    .header-right .btn-logout {
        width: 100%;
        text-align: center;
    }
    
    .modal-box {
        max-width: 100%;
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h2 {
        font-size: 1.1em;
    }
    
    .modal-form {
        padding: 18px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
        text-align: center;
    }
    
    .skills-table th,
    .skills-table td {
        padding: 10px 12px;
        font-size: 0.85em;
    }
    
    .actions-cell {
        flex-direction: column;
        gap: 5px;
    }
    
    .actions-cell .btn-edit,
    .actions-cell .btn-delete {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .admin-header h1 {
        font-size: 1.3em;
    }
    
    .table-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .count-badge {
        display: inline-block;
        width: fit-content;
        margin: 0 auto;
    }
}
/* ===== دکمه‌های کپی در جزئیات ===== */
.copy-btn-detail {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 6px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85em;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    transition: all 0.3s;
    margin-top: 8px;
    touch-action: manipulation;
    user-select: none;
}

.copy-btn-detail:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.copy-btn-detail:active {
    transform: scale(0.95);
}

.copy-btn-detail.copied {
    background: #28a745;
}

/* ===== دکمه کپی همه ===== */
.detail-copy-all {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed #e0e0e0;
}

.detail-copy-all button {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    touch-action: manipulation;
}

.detail-copy-all button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(245, 87, 108, 0.4);
}

.detail-copy-all button:active {
    transform: scale(0.95);
}
/* ================================================ */
/* ============ استایل‌های آکاردئون ============ */
/* ================================================ */

.accordion-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.accordion-item {
    background: white;
    border-radius: 10px;
    border: 1px solid #e8ecf0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item:hover {
    border-color: #cbd5e1;
}

.accordion-header {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: all 0.3s ease;
    gap: 12px;
    background: #f8fafc;
    touch-action: manipulation;
    min-height: 50px;
}

.accordion-header:hover {
    background: #f1f5f9;
}

.accordion-header:active {
    transform: scale(0.99);
}

.accordion-header.active {
    background: #eef2ff;
    border-bottom: 1px solid #e8ecf0;
}

.accordion-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

.accordion-label {
    flex: 1;
    font-weight: 600;
    font-size: 0.95em;
    color: #1e293b;
}

.accordion-arrow {
    font-size: 1.1em;
    color: #94a3b8;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.accordion-body {
    display: none;
    padding: 16px 20px 20px 20px;
    animation: accordionSlideDown 0.3s ease;
    background: #ffffff;
}

@keyframes accordionSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* دکمه کپی در بالای محتوا */
.copy-btn-accordion {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 5px 16px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 0.8em;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
    touch-action: manipulation;
    margin-bottom: 10px;
}

.copy-btn-accordion:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.copy-btn-accordion:active {
    transform: scale(0.95);
}

.copy-btn-accordion.copied {
    background: #28a745;
}

/* محتوای بخش */
.accordion-content {
    color: #334155;
    line-height: 1.9;
    font-size: 0.95em;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ============ دکمه کپی تمام اطلاعات ============ */
.detail-copy-all {
    text-align: center;
    padding: 15px 25px 25px 25px;
    border-top: 1px solid #e8ecf0;
}

.detail-copy-all button {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    touch-action: manipulation;
    width: 100%;
    max-width: 300px;
}

.detail-copy-all button:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 20px rgba(245, 87, 108, 0.4);
}

.detail-copy-all button:active {
    transform: scale(0.97);
}

/* ================================================ */
/* ============ ریسپانسیو آکاردئون ============ */
/* ================================================ */

@media (max-width: 768px) {
    .accordion-header {
        padding: 12px 14px;
        min-height: 44px;
        gap: 10px;
    }
    
    .accordion-label {
        font-size: 0.9em;
    }
    
    .accordion-body {
        padding: 14px 16px 16px 16px;
    }
    
    .accordion-content {
        font-size: 0.9em;
        line-height: 1.8;
    }
    
    .copy-btn-accordion {
        font-size: 0.75em;
        padding: 4px 14px;
        width: 100%;
        text-align: center;
    }
    
    .detail-copy-all button {
        font-size: 0.9em;
        padding: 10px 20px;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .accordion-header {
        padding: 10px 12px;
        min-height: 40px;
        gap: 8px;
    }
    
    .accordion-icon {
        font-size: 1em;
    }
    
    .accordion-label {
        font-size: 0.82em;
    }
    
    .accordion-body {
        padding: 12px 12px 14px 12px;
    }
    
    .accordion-content {
        font-size: 0.85em;
        line-height: 1.7;
    }
}