@font-face {
    font-family: 'Sahel';
    src: url('fonts/Sahel-Light.woff2') format('woff2'),
         url('fonts/Sahel-Light.woff') format('woff');
    font-display: swap;
    font-weight: 100;
}
@font-face {
    font-family: 'Sahel';
    src: url('fonts/Sahel.woff2') format('woff2'),
         url('fonts/Sahel.woff') format('woff');
    font-display: swap;
    font-weight: 400;
}
@font-face {
    font-family: 'Sahel';
    src: url('fonts/Sahel-Bold.woff2') format('woff2'),
         url('fonts/Sahel-Bold.woff') format('woff');
    font-display: swap;
    font-weight: bold;
}
@font-face {
    font-family: 'Sahel';
    src: url('fonts/Sahel-Black.woff2') format('woff2'),
         url('fonts/Sahel-Black.woff') format('woff');
    font-display: swap;
    font-weight: 900;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Sahel', 'Inter', sans-serif;
    background: linear-gradient(145deg, #f5f7fc 0%, #eef2f6 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 780px;
}

.card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(2px);
    border-radius: 2rem;
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.05);
    padding: 2rem;
    transition: all 0.2s;
}

h1, h2, h3 {
    font-family: 'Sahel', sans-serif;
    font-weight: bold;
}

h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a2c3e;
    text-align: center;
    margin-bottom: 0.5rem;
}

.subtitle {
    text-align: center;
    color: #5b6e8c;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    border-right: 3px solid #3b82f6;
    padding-right: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    line-height: 1.5;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-bottom: 1.8rem;
}

.full-width {
    grid-column: span 2;
}

/* Floating labels - اصلاح شده */
.floating {
    position: relative;
    margin-top: 1rem;
}

.floating input, .floating textarea {
    width: 100%;
    padding: 0.8rem 0.75rem 0.5rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    font-size: 1rem;
    background: white;
    transition: all 0.2s;
    font-family: 'Sahel', sans-serif;
    resize: vertical;
}

.floating textarea {
    padding-top: 0.9rem;
}

.floating label {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 0 5px;
    color: #94a3b8;
    transition: 0.2s;
    pointer-events: none;
    font-size: 0.9rem;
    font-family: 'Sahel', sans-serif;
}

.floating textarea ~ label {
    top: 1rem;
    transform: none;
}

.floating input:focus, .floating textarea:focus {
    border-color: #3b82f6;
    outline: none;
}

.floating input:focus ~ label,
.floating input:not(:placeholder-shown) ~ label,
.floating textarea:focus ~ label,
.floating textarea:not(:placeholder-shown) ~ label {
    top: -0.6rem;
    right: 10px;
    font-size: 0.7rem;
    color: #3b82f6;
    background: white;
}

/* ستاره الزامی */
.required-star {
    color: #e11d48;
    margin-right: 4px;
    font-size: 1rem;
}

.error-msg {
    font-size: 0.7rem;
    color: #e11d48;
    display: block;
    margin-top: 0.3rem;
    padding-right: 0.5rem;
}

.dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fefefe;
    margin: 1.5rem 0 1rem;
}

.dropzone.drag-over {
    border-color: #3b82f6;
    background: #eff6ff;
}

.dropzone-content svg {
    color: #64748b;
    margin-bottom: 0.5rem;
}

.dropzone p {
    color: #334155;
    font-weight: 500;
}

.dropzone small {
    color: #6b7280;
    font-size: 0.7rem;
    display: block;
    margin-top: 0.5rem;
}

.progress-container {
    background: #e2e8f0;
    border-radius: 40px;
    height: 8px;
    margin: 1rem 0;
    position: relative;
}

.progress-bar {
    width: 100%;
}

.progress-fill {
    width: 0%;
    height: 8px;
    background: #3b82f6;
    border-radius: 40px;
    transition: width 0.2s;
}

.progress-text {
    position: absolute;
    left: 10px;
    top: -20px;
    font-size: 0.75rem;
    color: #1e293b;
}

.submit-btn {
    width: 100%;
    background: #1e293b;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 0.5rem;
    font-family: 'Sahel', sans-serif;
}

.submit-btn:hover {
    background: #0f172a;
    transform: translateY(-2px);
}

/* مودال خطا */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 2rem;
    padding: 2rem;
    max-width: 400px;
    text-align: center;
    position: relative;
}

.close-modal {
    position: absolute;
    left: 1rem;
    top: 0.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: #94a3b8;
}

/* استایل جدول ادمین */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Sahel', sans-serif;
}
.admin-table th, .admin-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
    vertical-align: middle;
}
.admin-table th {
    background: #f1f5f9;
    font-weight: bold;
}
.action-icons {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.action-icons a {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.action-icons svg {
    width: 20px;
    height: 20px;
    stroke: #475569;
    transition: stroke 0.2s;
}
.action-icons a:hover svg {
    stroke: #3b82f6;
}
.back-btn {
    display: inline-block;
    margin-bottom: 1rem;
    text-decoration: none;
    background: #e2e8f0;
    padding: 0.3rem 1rem;
    border-radius: 2rem;
    color: #1e293b;
    font-size: 0.8rem;
}

/* badge تاریخ و زمان */
.badge-time {
    background: #e2e8f0;
    padding: 4px 8px;
    border-radius: 40px;
    font-size: 0.7rem;
    white-space: nowrap;
    font-family: 'Sahel', monospace;
}

/* Responsive */
@media (max-width: 640px) {
    .form-grid { grid-template-columns: 1fr; }
    .full-width { grid-column: span 1; }
    .card { padding: 1.5rem; }
    .admin-table th, .admin-table td { font-size: 0.75rem; padding: 6px; }
}