/* ---------- Login Page ---------- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c3e50, #2980b9);
}

.login-box {
    background: #fff;
    width: 100%;
    max-width: 360px;
    padding: 35px 30px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.login-logo {
    text-align: center;
    margin-bottom: 25px;
}
.login-logo h1 { font-size: 20px; color: #2c3e50; margin-bottom: 6px; }
.login-logo p { font-size: 13px; color: #888; }

/* ---------- Layout ---------- */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: #2c3e50;
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    flex-shrink: 0;
}
.sidebar-brand {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 15px;
}
.sidebar-brand h2 { font-size: 16px; margin-bottom: 4px; }
.sidebar-brand span { font-size: 12px; color: #bdc3c7; }

.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav a {
    color: #ecf0f1;
    padding: 12px 20px;
    font-size: 14px;
    border-right: 3px solid transparent;
    transition: 0.2s;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.08);
    border-right-color: #2980b9;
}

.sidebar-footer {
    padding: 15px 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.logout-link { color: #e74c3c; }

.main-content {
    flex: 1;
    padding: 30px;
    max-width: 1000px;
}

.page-header { margin-bottom: 25px; }
.page-header h1 { font-size: 24px; color: #2c3e50; }

/* ---------- Stats ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.stat-number { font-size: 26px; font-weight: bold; color: #2980b9; }
.stat-label { font-size: 13px; color: #888; margin-top: 6px; }

/* ---------- Sections ---------- */
.section {
    background: #fff;
    border-radius: 10px;
    padding: 20px 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.section-head h2 { font-size: 17px; }

.settings-preview {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}
.preview-item { flex: 1; min-width: 180px; }
.preview-label { font-size: 13px; color: #888; margin-bottom: 8px; }
.preview-item img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 6px;
    border: 1px solid #eee;
    display: block;
}
.empty-text { color: #aaa; font-size: 13px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    background: #2980b9;
    color: #fff;
    padding: 9px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}
.btn:hover { background: #21618c; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; text-align: center; margin-top: 10px; }
.btn-danger { background: #e74c3c; }
.btn-danger:hover { background: #c0392b; }

/* ---------- Forms ---------- */
form { margin-top: 10px; }
label { font-weight: bold; font-size: 13px; display: block; margin-bottom: 6px; }
input[type="text"],
input[type="password"],
input[type="file"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
}
input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #2980b9;
}

/* ---------- Field List ---------- */
.field-list { list-style: none; }
.field-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}
.field-list li:last-child { border-bottom: none; }

/* ---------- Messages ---------- */
.msg-success { color: #27ae60; margin-bottom: 15px; font-size: 14px; }
.msg-error { color: #e74c3c; margin-bottom: 15px; font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .admin-layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .sidebar-nav { flex-direction: row; overflow-x: auto; }
    .main-content { padding: 20px 15px; }
}

/* --- استایل‌های اضافه شده برای لوگو و بنر در پنل مدیریت --- */
/* استایل برای کانتینر لوگو در فرم تنظیمات */
.logo-container {
    width: 150px; /* اندازه بزرگتر برای لوگو */
    height: 150px; /* ارتفاع برابر با عرض برای دایره */
    border-radius: 50%; /* دایره‌ای کردن */
    overflow: hidden; /* جلوگیری از بیرون زدن عکس */
    margin-bottom: 15px; /* فاصله از المنت بعدی */
    display: inline-block; /* برای اینکه در کنار متن قرار گیرد (اگر نیاز باشد) */
    border: 3px solid #eee; /* حاشیه نازک */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* سایه */
    vertical-align: middle; /* تنظیم عمودی با متن */
}

/* استایل برای خود عکس لوگو داخل کانتینر */
.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* پر کردن کانتینر با حفظ نسبت ابعاد */
    display: block;
}

/* استایل برای کانتینر بنر در فرم تنظیمات */
.banner-container {
    max-width: 80%; /* عرض نسبی */
    height: 250px; /* ارتفاع مشخص */
    border-radius: 20px; /* مقدار دلخواه برای حالت بیضی */
    overflow: hidden;
    margin-bottom: 15px;
    margin-left: auto; /* وسط چین کردن */
    margin-right: auto; /* وسط چین کردن */
    border: 3px solid #eee; /* حاشیه */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* سایه */
}

/* استایل برای خود عکس بنر داخل کانتینر */
.banner-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* --- پایان استایل‌های اضافه شده --- */
