/*
    Project: DeepLaw - War Reporting Platform
    Theme: Dawn of Justice (War & Peace Transition)
    Description: Responsive CSS for report.php and home.php
*/

/* --- 1. متغیرهای پیشرفته طراحی (Thematic Palette) --- */
:root {
    /* تم صلح و امید (روشن) */
    --peace-bg: #ffffff;
    --peace-surface: #f8fafc;
    --law-blue: #2c5282; /* آبی عمیق قانونی */
    --hope-gold: #d69e2e; /* طلایی امیدبخش */
    --healing-green: #38a169; /* سبز بازسازی */

    /* تم جنگ و واقعیت (تیره) */
    --war-dark: #1a202c; /* سیاه متمایل به سرمه‌ای */
    --war-ashes: #4a5568; /* خاکستری سربی */
    --alert-red: #e53e3e; /* قرمز هشدار */

    /* تایپوگرافی و فواصل */
    --font-main: 'Vazirmatn', 'Tahoma', sans-serif;
    --radius-lg: 12px;
    --radius-md: 8px;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-bold: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- 2. تنظیمات پایه و ریست --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    direction: rtl;
    text-align: right;
    font-family: var(--font-main);
    background-color: var(--war-dark); /* پس‌زمینه کل سایت نماد شب و جنگ */
    color: var(--war-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 900px; /* کمی عرض بیشتر برای فرم بهتر */
    margin: 0 auto;
    padding: 0 20px;
}

/* --- 3. کانتینر اصلی گزارش (کارت سپید عدالت) --- */
.report-wrapper {
    padding: 60px 0;
    background: linear-gradient(180deg, var(--war-dark) 0%, #2d3748 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.report-container {
    background: var(--peace-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-bold);
    overflow: hidden;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- 4. هدر فرم (بخش پیام امید) --- */
.form-header {
    background: var(--law-blue);
    padding: 40px;
    text-align: center;
    color: white;
    border-bottom: 5px solid var(--hope-gold);
}

.form-header h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 800;
}

.form-header p {
    color: #cbd5e0;
    font-size: 0.95rem;
    max-width: 700px;
    margin: 0 auto;
}

/* --- 5. استایل‌های فرم و فیلدها (دقت و تقارن) --- */
.justice-form {
    padding: 40px;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--law-blue);
    margin: 30px 0 20px 0;
    font-weight: bold;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px; /* اضافه شده برای فاصله بهتر */
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--war-ashes);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    background-color: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--law-blue);
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* --- 6. بخش‌های ویژه (مکان، رسانه، امنیت) --- */
.location-box {
    grid-column: span 2;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* دو ستونه */
    gap: 15px;
    background: var(--peace-surface);
    padding: 20px;
    border-radius: var(--radius-md);
}

.upload-zone {
    border: 2px dashed #cbd5e0;
    padding: 30px;
    text-align: center;
    border-radius: var(--radius-md);
    background: var(--peace-surface);
    cursor: pointer;
    transition: var(--transition);
}

.upload-zone:hover {
    border-color: var(--hope-gold);
    background: #fffaf0;
}

.privacy-card {
    background: #fffaf0;
    border: 1px solid #fbd38d;
    padding: 20px;
    border-radius: var(--radius-md);
    margin-top: 15px;
}

/* --- 7. دکمه‌ها (Buttons) --- */
.btn-group {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    margin-top: 40px;
}

.btn {
    padding: 15px 30px;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: inherit;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-primary {
    background-color: var(--law-blue);
    color: white;
    box-shadow: 0 4px 14px rgba(44, 82, 130, 0.4);
}

.btn-primary:hover:not(:disabled) {
    background-color: #2a4365;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #edf2f7;
    color: var(--war-ashes);
}

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

/* --- استایل‌های جدید برای پیام‌ها و نوار وضعیت --- */
.p-4 { padding: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }

.msg-success {
    background-color: #f0fff4;
    color: #2f855a;
    padding: 15px;
    border: 1px solid #9ae6b4;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}
.msg-error {
    background-color: #fff5f5;
    color: #c53030;
    padding: 15px;
    border: 1px solid #feb2b2;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.progress-container {
    width: 100%;
    background-color: #e2e8f0;
    border-radius: var(--radius-md);
    margin: 20px 0;
    overflow: hidden;
    position: relative;
    height: 30px;
}
.progress-bar {
    width: 0%;
    height: 100%;
    background-color: var(--healing-green);
    transition: width 0.4s ease;
}
.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--war-dark);
    font-weight: bold;
}
#file-list ul {
    list-style-type: none;
    padding-right: 0;
}
#file-list li {
    background: var(--peace-surface);
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 5px;
    font-size: 0.9rem;
}


/* --- 8. رسپانسیو سازی حرفه‌ای (Responsive Design) --- */
@media (max-width: 768px) {
    .form-grid, .location-box {
        grid-template-columns: 1fr;
    }
     .location-box .form-group {
        grid-column: span 1 !important;
    }
    .btn-group {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .justice-form {
        padding: 20px;
    }
    .form-header {
        padding: 30px 15px;
    }
    .form-header h2 {
        font-size: 1.4rem;
    }
    .report-wrapper {
        padding: 20px 0;
    }
}

/* انیمیشن ورود */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.report-container {
    animation: slideUp 0.6s ease-out;
}

/* استایل چک‌باکس سفارشی */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--hope-gold);
    cursor: pointer;
    flex-shrink: 0;
}

