/* ----- Global Layout ----- */

body {
    margin: 0;
    font-family: "IRANSans", sans-serif;
    background: #0d0d0d;
    /* بک‌گراند مشکی ساده */
    color: #e6e6e6;
    direction: rtl;
    /* راست‌چین کردن کلی */
}

.container {
    width: 90%;
    margin: 40px auto;
    background: #1a1a1a;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(255, 200, 100, 0.15);
}


/* ----- Typography ----- */

h1,
h2,
h3 {
    color: #f5c15c;
    margin-bottom: 20px;
    font-weight: 600;
}


/* ----- Forms ----- */

.form-group {
    margin-bottom: 20px;
    /* فاصله بیشتر بین فیلدها */
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-weight: 500;
    /* کمی ضخیم‌تر */
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #121212;
    color: #fff;
    font-size: 15px;
    box-sizing: border-box;
    /* برای اینکه padding و border حساب بشه */
}

input:focus,
textarea:focus {
    border-color: #f5c15c;
    outline: none;
    box-shadow: 0 0 0 2px rgba(245, 193, 92, 0.3);
    /* سایه ملایم موقع فوکوس */
}


/* ----- Buttons & Icons ----- */

.button-container {
    display: flex;
    /* برای چیدمان افقی دکمه‌ها */
    align-items: center;
    gap: 10px;
    /* فاصله بین آیتم‌ها */
    margin-top: 20px;
    margin-bottom: 20px;
}

.btn-primary {
    /* دکمه اصلی (مثلا ثبت، ویرایش) */
    background: #f5c15c;
    color: #000;
    padding: 12px 24px;
    /* کمی بزرگتر */
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
    text-decoration: none;
    font-size: 15px;
}

.btn-primary:hover {
    background: #ffdb88;
    transform: translateY(-1px);
    /* کمی بالا رفتن */
}

.btn-secondary {
    /* دکمه ثانویه (مثلا لغو، مشاهده) */
    background: #333;
    color: #e6e6e6;
    padding: 12px 24px;
    border-radius: 6px;
    border: 1px solid #555;
    font-weight: 500;
    cursor: pointer;
    transition: 0.3s ease;
    text-decoration: none;
    font-size: 15px;
}

.btn-secondary:hover {
    background: #444;
    border-color: #666;
    transform: translateY(-1px);
}

i.icon {
    margin-left: 8px;
    /* فاصله آیکون از متن */
    color: #f5c15c;
    /* رنگ آیکون */
}

.btn-icon {
    /* دکمه فقط با آیکون */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    transition: 0.3s ease;
}

.btn-icon:hover {
    color: #f5c15c;
    transform: scale(1.1);
}

/* ===== Table Tools ===== */

.table-tools{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:15px;
    margin-bottom:20px;
    flex-wrap:wrap;
}

/* Search */

.search-box input{
    width:260px;
    padding:10px 14px;
    border-radius:6px;
    border:1px solid #444;
    background:#121212;
    color:#fff;
    font-size:14px;
}

.search-box input:focus{
    border-color:#f5c15c;
    box-shadow:0 0 0 2px rgba(245,193,92,.2);
    outline:none;
}

/* Filters */

.status-filters{
    display:flex;
    gap:8px;
}

.filter-btn{
    width:38px;
    height:38px;
    border-radius:8px;
    border:1px solid #333;
    background:#151515;
    cursor:pointer;
    font-size:16px;
    transition:.25s;
}

.filter-btn:hover{
    transform:translateY(-2px);
    border-color:#f5c15c;
}

/* Active */

.filter-btn.active{
    border-color:#f5c15c;
    background:#262626;
}

/* رنگ‌ها */

.filter-btn.in-progress.active{
    box-shadow:0 0 8px rgba(0,255,120,.4);
}

.filter-btn.completed.active{
    box-shadow:0 0 8px rgba(0,140,255,.4);
}

.filter-btn.error.active{
    box-shadow:0 0 8px rgba(255,0,0,.4);
}


/* ----- Table ----- */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
}

table th,
table td {
    padding: 14px;
    text-align: center;
}

table th {
    background: #262626;
    color: #f5c15c;
    font-weight: 600;
}

table tr:nth-child(even) {
    background: #141414;
}

table tr:hover {
    background: #222;
}

table td .btn-icon {
    /* استایل آیکون‌ها در سلول‌های جدول */
    margin: 0 5px;
    /* فاصله بین آیکون‌ها */
}

.table-wrap{
    overflow-x:auto;
}

/* ===== Status Badge ===== */

.status-badge{
    font-size:16px;
    font-weight:700;
    min-width:85px;
}

/* statuses */
.status-badge.running{
    color:#38d87a;
}

.status-badge.completed{
    color:#48a8ff;
}

.status-badge.error{
    color:#ff6666;
}

.status-badge.starting,
.status-badge.waiting_login,
.status-badge.paused{
    color:#f5c15c;
}

/* ===== Actions ===== */

.action-group{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:8px;
}

.action-btn{
    width:36px;
    height:36px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:10px;
    background:#151515;
    border:1px solid #333;
    color:#fff;
    font-size:17px;
    transition:0.25s ease;
}

.action-btn:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 18px rgba(0,0,0,.35);
}

.view-btn:hover{
    background:#204a9e;
    border-color:#3d6fe0;
}

.edit-btn:hover{
    background:#6e4d00;
    border-color:#d8a12a;
}

.image-btn:hover{
    background:#0f6648;
    border-color:#19b37b;
}


/* ----- image LIST (MAIN UX) ----- */

.hint {
    font-size: 12px;
    color: #888;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 14px 16px;
    border-radius: 10px;

    background: linear-gradient(145deg, #1f1f1f, #161616);
    border: 1px solid #2d2d2d;

    cursor: pointer;
    transition: all 0.25s ease;

    position: relative;
    overflow: hidden;
}

/* hover glow */
.file-btn:hover {
    transform: translateY(-2px);
    border-color: #f5c15c;
    box-shadow: 0 10px 25px rgba(245, 193, 92, 0.12);
}

/* file name */
.file-text {
    flex: 1;
    font-size: 14px;
    color: #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* arrow */
.file-arrow {
    color: #777;
    font-size: 20px;
    transition: 0.2s;
}

.file-btn:hover .file-arrow {
    color: #f5c15c;
    transform: translateX(-3px);
}

/* ----- EMPTY STATE ----- */

.empty-state {
    text-align: center;
    padding: 40px;
    color: #777;
    border: 1px dashed #333;
    border-radius: 10px;
    background: #141414;
}

/* ----- Links ----- */

a {
    color: #f5c15c;
    text-decoration: none;
}

a:hover {
    color: #ffdb88;
}


/* ----- Card specific adjustments ----- */

.card {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(255, 200, 100, 0.15);
}

.card h1,
.card h2 {
    text-align: center;
    /* تیترها در کارت وسط چین */
    margin-bottom: 30px;
}

.card form {
    display: flex;
    flex-direction: column;
}

/* ----- GLOBAL RESET ----- */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "IRANSans", sans-serif;
    background: radial-gradient(circle at top, #141414, #0d0d0d);
    color: #e6e6e6;
    direction: rtl;
}

/* ----- LAYOUT ----- */

.container {
    margin: 50px auto;
}

.card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.card strong{
    color:#f5c15c;
    font-weight:600;
    margin-right:8px;
}

/* ----- HEADER ----- */

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #2a2a2a;
}

.top-bar h2 {
    margin: 0;
    font-size: 20px;
    color: #f5c15c;
}

.info-box{
    background:#121212;
    border:1px solid #333;
    border-radius:10px;
    padding:18px 22px;
    margin:20px auto 0;
    max-width: 1000px;
}

.info-box p{
    margin:12px 0;
    text-align:center;
    direction:ltr;
    font-size:16px;
    color:#e6e6e6;
}

.shot-box{
    margin-top:30px;
    text-align:center;
}

.shot-box h3{
    margin-bottom:18px;
}

#coin-shot{
    display:block;
    margin:0 auto;
    max-width:520px;
    width:100%;
    border-radius:12px;
    border:1px solid #333;
    box-shadow:0 0 14px rgba(245,193,92,0.18);
    transition:0.3s ease;
}

#coin-shot:hover{
    transform:scale(1.02);
    border-color:#f5c15c;
}

#no-shot{
    color:#888;
    font-size:14px;
    margin-top:12px;
    text-align:center;
}

/* ===== Progress Bar ===== */

.progress-wrap{
    margin-top:32px;
    width:100%;
    max-width:520px;
    margin-left:auto;
    margin-right:auto;
}

.progress-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:8px;
    font-size:14px;
    color:#ccc;
}

.progress-bar{
    width:100%;
    height:22px;
    background:#1a1a1a;
    border:1px solid #333;
    border-radius:50px;
    overflow:hidden;
}

#progress-fill{
    width:0%;
    height:100%;
    border-radius:50px;
    background:linear-gradient(90deg,#f5c15c,#ffd978);
    box-shadow:0 0 12px rgba(245,193,92,.35);
    transition:width .6s ease;
}

#progress-text{
    color:#f5c15c;
    font-weight:700;
}

.progress-title{
    font-size:15px;
    font-weight:700;
    color:#f5c15c;
    letter-spacing:.3px;
}

/* درصد داخل نوار */
#progress-inside{
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    font-size:12px;
    font-weight:800;
    color:#111;
    white-space:nowrap;
    text-shadow:0 1px 2px rgba(255,255,255,.25);
    pointer-events:none;
}

#status-desc{
    white-space: pre-line;
    line-height: 1.7;
    color:#d7d7d7;
}