/* =============================================
   ProjectBoard – Modern Compact Light UI
   ============================================= */

/* =====================================
   RTL + DARKER PROJECT CARDS
===================================== */

/* کل صفحه راست چین */
body,
.site-header,
.main-content,
.category-section,
.project-card,
.log-entry,
.add-log-form {
    direction: rtl;
    text-align: right;
}

/* هدرها */
.category-header,
.project-card-header,
.log-entry-header,
.form-actions {
    direction: rtl;
}

/* دسته ها */
.category-section {
    background: #ffffff;
}

/* پروژه ها تیره تر */
.project-card {
    background: #d2d9e6 !important;
    border: 1px solid #b6c1d4 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

    .project-card:hover {
        background: #c5cedd !important;
        border-color: #9daac1 !important;
    }

.project-title {
    color: #1b2430;
}

.project-description {
    color: #4a5568;
}

/* بخش لاگ */
.log-entry {
    background: #e8edf5;
}

/* فرم ثبت گزارش */
.add-log-form {
    background: #edf2f8;
}

/* دکمه ها */
.btn-add-log {
    text-align: center;
}

.btn-save,
.btn-cancel {
    min-width: 90px;
}

/* هندل درگ سمت راست */
.drag-handle {
    order: 2;
    margin-left: 0;
    margin-right: 8px;
}

.project-info {
    order: 1;
}

/* فایل دانلود */
.file-row,
.btn-download {
    direction: rtl;
}

/* فیلدها */
input,
textarea,
select,
.form-control {
    direction: rtl;
    text-align: right;
}

/* هنگام درگ */
.project-card.ui-draggable-dragging {
    background: #bcc7d9 !important;
    z-index: 999999 !important;
}



*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-base: #f5f7fb;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f9fbff;
    --bg-log: #f7f9fd;
    --bg-form: #f8faff;
    --border: #e3e8f3;
    --border-strong: #cdd7ea;
    --text-primary: #1f2937;
    --text-secondary: #5b6477;
    --text-muted: #9aa4b7;
    --accent: #2563eb;
    --accent-glow: rgba(37,99,235,.08);
    --accent-hover: #1d4ed8;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 10px rgba(15,23,42,.05);
    --shadow-md: 0 8px 30px rgba(15,23,42,.08);
    --font-body: 'IRANYekan';
    --font-mono: 'IRANYekan';
}

html {
    font-size: 14px;
}

body {
    font-family: 'IRANYekan';
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
}

/* scrollbar */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-thumb {
    background: #cdd7ea;
    border-radius: 20px;
}

/* =========================
   HEADER
========================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1800px;
    margin: auto;
    padding: 0 18px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.brand-name {
    font-weight: 700;
    color: var(--text-primary);
}

.header-brand input,
.header-brand select {
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 10px;
    background: white;
}

.user-badge {
    background: #eef4ff;
    color: var(--accent);
    padding: 6px 12px;
    border-radius: 50px;
    font-family: 'IRANYekan';
    font-size: .8rem;
}

/* =========================
   MAIN
========================= */

.main-content {
    padding: 18px;
    max-width: 1900px;
    margin: auto;
}

/* =========================
   CATEGORY
========================= */

.category-section {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.category-header {
    background: white;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.category-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-dot {
    width: 9px;
    height: 9px;
    background: var(--accent);
    border-radius: 50%;
}

.category-title {
    font-size: .95rem;
    font-weight: 700;
}

.project-count {
    background: #f3f6fb;
    color: var(--text-secondary);
    border-radius: 50px;
    padding: 5px 12px;
    font-size: .72rem;
}

/* =========================
   GRID
========================= */

.projects-grid {
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
    gap: 12px;
    min-height: 90px;
}

    .projects-grid.drop-active {
        background: rgba(37,99,235,.04);
    }

/* =========================
   CARD
========================= */

.project-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    transition: .2s;
    box-shadow: var(--shadow-sm);
}

    .project-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: #b8caf9;
    }

    .project-card.ui-draggable-dragging {
        z-index: 99999;
        transform: rotate(2deg);
        box-shadow: 0 20px 40px rgba(0,0,0,.15);
    }

.project-card-header {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.drag-handle {
    color: #9ca3af;
    cursor: grab;
    font-size: 18px;
}

.project-info {
    flex: 1;
}

.project-title {
    font-size: .9rem;
    font-weight: 700;
    margin-bottom: 3px;
}

.project-date {
    color: var(--text-muted);
    font-size: .7rem;
    font-family: 'IRANYekan';
}

.project-description {
    font-size: .78rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.7;
}

/* =========================
   DOWNLOAD
========================= */

.file-row {
    margin-bottom: 8px;
}

.btn-download {
    background: #eef4ff;
    color: var(--accent);
    padding: 5px 10px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
}

/* =========================
   LOG
========================= */

.log-section {
    margin-top: 10px;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

.btn-toggle-logs {
    background: none;
    border: none;
    color: var(--text-secondary);
    display: flex;
    gap: 8px;
    cursor: pointer;
    font-size: .8rem;
}

.log-badge {
    background: #eef2ff;
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 50px;
}

.log-list {
    display: none;
    margin-top: 10px;
}

    .log-list.open {
        display: block;
    }

.log-entry {
    background: var(--bg-log);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    border-left: 3px solid var(--accent);
}

.log-entry-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.log-title {
    font-size: .78rem;
    font-weight: 700;
}

.log-date {
    font-size: .68rem;
    color: var(--text-muted);
}

.log-description {
    white-space: pre-wrap;
    font-size: .74rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-family: 'IRANYekan';
}

/* =========================
   ADD LOG
========================= */

.add-log-bar {
    margin-top: 10px;
}

.btn-add-log {
    width: 100%;
    padding: 8px;
    border: 1px dashed var(--border-strong);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    color: var(--text-secondary);
    transition: .2s;
    font-family: 'IRANYekan';
}

    .btn-add-log:hover {
        background: #f4f8ff;
        border-color: var(--accent);
        color: var(--accent);
    }

.add-log-form {
    display: none;
    margin-top: 10px;
    padding: 12px;
    background: var(--bg-form);
    border-radius: 10px;
    border: 1px solid var(--border);
}

    .add-log-form.open {
        display: block;
    }

.form-group {
    margin-bottom: 10px;
}

    .form-group label {
        display: block;
        margin-bottom: 4px;
        font-size: .75rem;
    }

.form-control {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    background: white;
}

    .form-control:focus {
        outline: none;
        border-color: var(--accent);
    }

.form-actions {
    display: flex;
    gap: 8px;
}

.btn-save {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    cursor: pointer;
}

.btn-cancel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 18px;
    cursor: pointer;
}

/* =========================
   EMPTY
========================= */

.empty-state {
    text-align: center;
    padding: 25px;
    color: var(--text-muted);
    grid-column: 1/-1;
}

.empty-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
}

/* =========================
   LOADING
========================= */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.8);
    backdrop-filter: blur(4px);
    z-index: 9999;
}

.spinner-ring {
    width: 40px;
    height: 40px;
    border: 4px solid #dbe4ff;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================
   TOAST
========================= */

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: white;
    border-radius: 10px;
    padding: 14px 18px;
    box-shadow: var(--shadow-md);
    z-index: 9999;
}

    .toast.success {
        border-left: 4px solid var(--success);
    }

    .toast.error {
        border-left: 4px solid var(--danger);
    }

/* =========================
   DRAG
========================= */

.ui-draggable-helper {
    z-index: 99999 !important;
    opacity: .95;
}

/* =========================
   LARGE SCREEN
========================= */

@media (min-width:1500px) {

    .main-content {
        max-width: 2200px;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill,minmax(260px,1fr));
    }
}

/* =========================
   MOBILE
========================= */

@media(max-width:768px) {

    .main-content {
        padding: 10px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .header-inner {
        height: auto;
        padding: 10px;
    }

    .header-brand {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* =====================================
   KANBAN LAYOUT
===================================== */
/* =====================================
   RESPONSIVE KANBAN
===================================== */
/* =========================
   CATEGORY LAYOUT
========================= */
/* کانتینر اصلی */
.main-content {
    max-width: 100%;
    padding: 18px;
}

/* UpdatePanel */
#upMain,
#upMain > div,
#upMain .ContentTemplateContainer {
    display: grid;
    grid-template-columns: repeat(3, minmax(320px, 1fr));
    gap: 18px;
    align-items: start;
}

/* دسته */
.category-section {
    width: auto;
    margin: 0;
    background: #fff;
    border: 1px solid #d9e1f1;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
    overflow: hidden;
}

/* تبلت */
@media (max-width:1200px) {
    #upMain,
    #upMain > div,
    #upMain .ContentTemplateContainer {
        grid-template-columns: repeat(2, minmax(300px,1fr));
    }
}

/* موبایل */
@media (max-width:768px) {
    #upMain,
    #upMain > div,
    #upMain .ContentTemplateContainer {
        grid-template-columns: 1fr;
    }
}
/* =====================================
   HEADER IMPROVEMENT (UPLOAD + + BUTTON)
===================================== */

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* عنوان */
.brand-name {
    font-size: 1rem;
    font-weight: 800;
    color: #1f2937;
    padding: 6px 10px;
    background: #eef4ff;
    border-radius: 10px;
}

/* دکمه + (LinkButton) */
.header-brand a,
.header-brand .aspNetDisabled,
.header-brand input[type="submit"] {
    background: #2563eb;
    color: #fff !important;
    border: none;
    border-radius: 10px;
    padding: 6px 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .header-brand a:hover {
        background: #1d4ed8;
        transform: translateY(-1px);
    }

/* FileUpload */
.header-brand input[type="file"] {
    background: #ffffff;
    border: 1px solid #d6deee;
    border-radius: 10px;
    padding: 6px;
    font-size: .75rem;
    max-width: 180px;
    color: #334155;
}

/* TextBox ها */
.header-brand input[type="text"] {
    border: 1px solid #d6deee;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: .8rem;
    min-width: 120px;
    background: #fff;
}

    .header-brand input[type="text"]:focus {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37,99,235,.1);
    }

/* DropDown */
.header-brand select {
    border: 1px solid #d6deee;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: .8rem;
    background: #fff;
}

/* جمع و جور شدن روی موبایل */
@media (max-width: 768px) {
    .header-brand {
        flex-direction: column;
        align-items: stretch;
    }

        .header-brand input,
        .header-brand select,
        .header-brand a {
            width: 100%;
        }
}
/* =====================================
   FOOTER CREDIT
===================================== */

.footer-credit {
    margin-top: 20px;
    padding: 12px 18px;
    text-align: center;
    font-size: 0.8rem;
    color: #6b7280;
    background: #ffffff;
    border-top: 1px solid #e3e8f3;
    direction: rtl;
    font-family: 'IRANYekan';
}

/* حالت قشنگ‌تر */
.footer-credit {
    position: relative;
}

    .footer-credit::before {
        content: "";
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 120px;
        height: 2px;
        background: linear-gradient(90deg, transparent, #2563eb, transparent);
    }