/* ۱. تعریف فونت وزیر */
@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ۲. تنظیمات پایه */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --danger: #ef4444;
    --bg: #f8fafc;
    --card: #ffffff;
    --border: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
}

body {
    direction: rtl;
    text-align: right;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background-color: var(--bg);
    margin: 0;
    padding: 20px;
    color: var(--text-main);
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* ۳. کارت‌ها و گرید */
.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.folder-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    position: relative;
}

.folder-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ۴. آیکون پوشه */
.icon-folder {
    width: 45px;
    height: 34px;
    background: #fbbf24;
    border-radius: 0 4px 4px 4px;
    position: relative;
    display: inline-block;
}

.icon-folder::before {
    content: '';
    width: 22px;
    height: 9px;
    background: #fbbf24;
    position: absolute;
    top: -9px;
    right: 0;
    border-radius: 4px 4px 0 0;
}

/* ۵. متون و جزییات کاربر */
.folder-card strong {
    margin-top: 15px;
    font-weight: 700;
    color: #334155;
    display: block;
}

.user-preview {
    width: 100%;
    margin-top: 15px;
    padding: 10px;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 0.85em;
    color: #475569;
    text-align: right;
}

.user-preview div {
    margin-bottom: 2px;
}

.folder-footer {
    width: 100%;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

/* ۶. فرم‌ها و دکمه‌ها */
.upload-box {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
}

input[type="text"], 
input[type="password"], 
input[type="tel"] {
    font-family: 'Vazirmatn';
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    width: 100%;
    margin-bottom: 10px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

button {
    font-family: 'Vazirmatn';
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

button:hover {
    background-color: var(--primary-hover);
}

/* ۷. استایل لیست فایل‌ها */
.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.delete-link {
    color: var(--danger);
    text-decoration: none;
    font-size: 0.85em;
    background: #fef2f2;
    padding: 5px 12px;
    border-radius: 6px;
    transition: 0.2s;
}

.delete-link:hover {
    background: #fee2e2;
}