﻿/* ===== LOCAL FONTS ===== */
@font-face {
    font-family: IRANSans;
    font-style: normal;
    font-weight: 300;
    src: url('fonts/IRANSansWeb_Light.eot'), url('fonts/IRANSansWeb_Light.eot?#iefix') format('embedded-opentype'), url('fonts/IRANSansWeb_Light.woff2') format('woff2'), url('fonts/IRANSansWeb_Light.woff') format('woff'), url('fonts/IRANSansWeb_Light.ttf') format('truetype');
}

@font-face {
    font-family: IRANSans;
    font-style: normal;
    font-weight: 400;
    src: url('fonts/IRANSansWeb(FaNum).eot'), url('fonts/IRANSansWeb(FaNum).eot?#iefix') format('embedded-opentype'), url('fonts/IRANSansWeb(FaNum).woff2') format('woff2'), url('fonts/IRANSansWeb(FaNum).woff') format('woff'), url('fonts/IRANSansWeb(FaNum).ttf') format('truetype');
}

@font-face {
    font-family: IRANSans;
    font-style: normal;
    font-weight: 500;
    src: url('fonts/IRANSansWeb(FaNum)_Medium.eot'), url('fonts/IRANSansWeb(FaNum)_Medium.eot?#iefix') format('embedded-opentype'), url('fonts/IRANSansWeb(FaNum)_Medium.woff2') format('woff2'), url('fonts/IRANSansWeb(FaNum)_Medium.woff') format('woff'), url('fonts/IRANSansWeb(FaNum)_Medium.ttf') format('truetype');
}

@font-face {
    font-family: IRANSans;
    font-style: normal;
    font-weight: 600;
    src: url('fonts/IRANSansWeb_Bold.eot'), url('fonts/IRANSansWeb_Bold.eot?#iefix') format('embedded-opentype'), url('fonts/IRANSansWeb_Bold.woff2') format('woff2'), url('./fonts/IRANSansWeb_Bold.woff') format('woff'), url('fonts/IRANSANSWEB_BOLD.TTF') format('truetype');
}

@font-face {
    font-family: IRANSans;
    font-style: normal;
    font-weight: 700;
    src: url('fonts/IRANSANSWEB(FANUM)_BOLD.TTF') format('truetype');
}

/* ===== MINIMAL CSS VARIABLES ===== */
:root {
    /* Colors */
    --primary: #6C5FFC;
    --secondary: #6c757d;
    --primary-dark: #584ACB;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --light: #f0f0f5;
    --dark: #282f53;
    --white: #ffffff;
    --white-gradient: linear-gradient(145deg, #fafbfc 0%, #ffffff 100%);
    --muted: #74829c;
    --table-bg-color: #f8f9fa;
    --form-color-border: #e9edf6;
    --default-text-color: #282f53;
    /* Spacing */
    --border-radius: 1rem;
    --border-radius-sm: 0.75rem;
    --border-radius-xl: 1.5rem; /* بازگردانده شد برای کارت‌های بزرگ */
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    /* Typography */
    --font-family: 'IRANSans', 'Tahoma', 'Arial', sans-serif;
    /* --font-size-xs: 0.8.13rem;*/
    --font-size-small: 0.875rem;
    --font-size-medium: 1rem;
    /* --font-size-lg: 1.18rem;*/
    /*--font-size-extra-large: 1.25rem;*/

    --font-size-xs: 0.750rem;
    --font-size-sm: 0.813rem;
    --font-size-base: 0.875rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.250rem;
    --font-size-2xl: 1.5rem;
    --font-weight-Thin: 100; /* Ultra-Light */
    --font-weight-Extra-Light: 200;
    --font-weight-Light: 300; /* Regular */
    --font-weight-normal: 400;
    --font-weight-Medium: 500;
    --font-weight-semibold: 600; /* Demi-Bold */
    --font-weight-bold: 700;
    --font-weight-Extra-Bold: 800; /* Ultra-Bold */
    --font-weight-Black: 900; /* Heavy */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    --letter-spacing-normal: 0;
}

/* ===== BASE STYLES ===== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: 400;
    line-height: 1.5;
    color: var(--dark);
    text-align: start;
    background-color: var(--light);
}
html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -ms-overflow-style: scrollbar;
    -webkit-tap-highlight-color: transparent;
}
a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

    a:hover {
        opacity: 0.8;
    }

/* ===== LAYOUT ===== */
.main-content {
    display: flex;
}

.content {
    min-height: 100vh;
    width: 100%;
    padding-top: 75px;
}

.dashboard-content {
    padding: 2rem 1.5rem;
    max-width: 100%;
    overflow-x: hidden;
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    flex-direction: column;
    margin: 0 0 2rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--form-color-border);
}

.page-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-Medium);
    color: var(--dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    line-height: var(--line-height-tight);
}

    .page-title i {
        font-size: var(--font-size-lg);
        color: var(--primary);
    }

.page-subtitle {
    font-size: var(--font-size-sm);
    color: var(--muted);
    margin: 0.75rem 0 0 0;
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-relaxed);
}

/* ===== CARDS ===== */
.card {
    position: relative;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    border: inherit !important;
    background-clip: border-box;
    border-radius: 7px;
    box-shadow: 0 4px 25px 0 rgba(168, 180, 208, 0.1);
}

    .card > hr {
        margin-inline-end: 0;
        margin-inline-start: 0;
    }

    .card > .list-group:first-child .list-group-item:first-child {
        border-start-start-radius: 3px;
        border-start-end-radius: 3px;
    }

    .card > .list-group:last-child .list-group-item:last-child {
        border-end-end-radius: 7px;
        border-end-start-radius: 7px;
    }

.card-body {
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    padding: 25px;
    margin: 0;
    position: relative;
}

.card-subtitle {
    margin-block-start: -0.75rem;
    margin-block-end: 0;
}

.card-text:last-child {
    margin-block-end: 0;
}

.card-link:hover {
    text-decoration: none;
}

.card-link + .card-link {
    margin-inline-start: 1.5rem;
}

.card-header:first-child {
    border-radius: 2px 2px 0 0;
}

.card-header + .list-group .list-group-item:first-child {
    border-block-start: 0;
}

.card-footer {
    padding: 1.5rem 1.5rem;
    background-color: rgba(0, 0, 0, 0.03);
    border-block-start: 1px solid #e9edf4;
    color: #6e7687 !important;
}

.card-img {
    width: 100%;
    border-radius: 2px;
}

.card-img-top {
    width: 100%;
    border-start-start-radius: 2px;
    border-start-end-radius: 2px;
}

.card-img-bottom {
    width: 100%;
    border-end-end-radius: 2px;
    border-end-start-radius: 2px;
}

.card-group {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
}

    .card-group > .card {
        margin-block-end: 0.75rem;
    }

.card-columns .card {
    margin-block-end: 1.5rem;
}

/*------ Default Card Values -------*/
.card-header {
    background: none;
    padding: 1.2rem 1.5rem;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    margin-block-end: 0;
    background-color: transparent;
    border-block-end: 1px solid #e9edf4;
    letter-spacing: 0.2px;
}

    .card-header .card-title {
        margin-block-end: 0;
    }

    .card-header.border-0 + .card-body {
        padding-block-start: 0;
    }

.card-title {
    font-size: var(--font-size-md);

    margin-block-end: 1.5rem;
    color: var(--dark);
}

.card-table {
    margin-block-end: 0;
}

    .card-table tr:first-child td,
    .card-table tr:first-child th {
        border-block-start: 0;
    }

    .card-table tr td:first-child,
    .card-table tr th:first-child {
        padding-inline-start: 1.5rem !important;
    }

    .card-table tr td:last-child,
    .card-table tr th:last-child {
        padding-inline-end: 1.5rem;
    }

.card-fullscreen {
    position: fixed;
    inset-block-start: 0;
    inset-inline-start: 0;
    inset-inline-end: 0;
    inset-block-end: 0;
    z-index: 1;
    margin: 0;
}

.card .box .img img {
    width: 150px;
    height: 150px;
    border-radius: 100%;
}

.card .box h2 {
    font-size: 20px;
    color: #262626;
    margin: 20px auto;
}

    .card .box h2 span {
        font-size: 14px;
        color: #fff;
        display: inline-block;
        padding: 4px 10px;
        border-radius: 15px;
    }

.card .box p {
    color: #262626;
}


/* ===== STATUS STYLES ===== */
.status-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    min-height: 1.5rem;
}

.status-text {
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-normal);
    white-space: nowrap;
    color: inherit;
}

.status-container.status-active {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #047857;
}

.status-container.status-pending {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #b45309;
}

.status-container.status-inactive {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #b91c1c;
}

/* ===== ACTION BUTTONS ===== */
.action-button-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(226, 232, 240, 0.8);
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.action-btn-view {
    color: #0891b2;
    background: rgba(8, 145, 178, 0.1);
}

.action-btn-edit {
    color: #d97706;
    background: rgba(217, 119, 6, 0.1);
}

.action-btn-delete {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

.action-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: var(--font-size-xs);
    white-space: nowrap;
    z-index: 1000;
    animation: tooltip-appear 0.3s ease;
}

.action-btn[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #333;
    z-index: 999;
    animation: tooltip-appear 0.3s ease;
}

@keyframes tooltip-appear {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.action-btn-view:hover i {
    animation: view-bounce 0.6s ease-in-out;
}

.action-btn-edit:hover i {
    animation: edit-wiggle 0.8s ease-in-out;
}

.action-btn-delete:hover i {
    animation: delete-shake 0.5s ease-in-out;
}

@keyframes view-bounce {
    0%, 100% {
        transform: scale(1.1) translateY(0);
    }

    50% {
        transform: scale(1.15) translateY(-2px);
    }
}

@keyframes edit-wiggle {
    0%, 100% {
        transform: rotate(0);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

@keyframes delete-shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-2px);
    }

    75% {
        transform: translateX(2px);
    }
}

/* ===== TEXT & LINK STYLES IN TABLE ===== */
.link-primary-color {
    color: var(--primary);
}

    .link-primary-color:hover {
        color: var(--primary-dark);
    }

.text-truncate-enhanced {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.url-text, .email-display {
    direction: ltr;
    text-align: left;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: var(--font-size-xs);
}

.email-display {
    color: var(--muted);
}

.table-cell-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
}

.table-cell-icon {
    color: var(--muted);
}

.category-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    background: rgba(108, 95, 252, 0.05);
    border-radius: var(--border-radius-sm);
    color: var(--primary);
    font-size: var(--font-size-xs);
    border: 1px solid rgba(108, 95, 252, 0.1);
}

    .category-link:hover {
        background: rgba(108, 95, 252, 0.1);
        color: var(--primary-dark);
    }

.dashboard-table .date-text {
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-normal);
}

/* ===== PAGER STYLES ===== */
.pager {
    text-align: center;
    padding: 1rem;
}

    .pager table {
        margin: 0 auto;
    }

    .pager td {
        border: none;
        padding: 0.25rem;
    }

    .pager a, .pager span {
        display: inline-block;
        padding: 0.5rem 0.75rem;
        min-width: 2rem;
        text-align: center;
        border-radius: var(--border-radius-sm);
        border: 1px solid #ddd;
    }

    .pager a {
        color: var(--primary);
    }

        .pager a:hover {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }

    .pager span {
        color: white;
        background: var(--primary);
        border-color: var(--primary);
        font-weight: 500;
    }

/* ===== UTILITY CLASSES (Used in ASPX) ===== */
.d-flex {
    display: flex;
}

.d-block {
    display: block;
}

.d-none {
    display: none;
}

.align-items-center {
    align-items: center;
}

.justify-content-start {
    justify-content: flex-start;
}

.text-center {
    text-align: center;
}

.text-danger {
    color: var(--danger) !important;
}

.text-muted {
    color: var(--muted) !important;
}

.mb-0 {
    margin-bottom: 0;
}

.ms-1 {
    margin-inline-start: 0.25rem;
}

.ms-2 {
    margin-inline-start: 0.5rem;
}

.me-2 {
    margin-inline-end: 0.5rem;
}

.py-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

/* ===== BUTTONS (Used in Modals & Empty Data) ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: var(--font-size-small);
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-xs);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

    .btn-primary:hover {
        background: var(--primary-dark);
        border-color: var(--primary-dark);
    }

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 991.98px) {
    .dashboard-content {
        padding: 1.5rem 1rem;
    }

    .status-text {
        display: none;
    }
    /* Hide text on tablets/mobile, show only icon */
}

@media (max-width: 767.98px) {
    .dashboard-content {
        padding: 1rem;
    }
    /* Stack table for mobile */
    .dashboard-table thead {
        display: none;
    }

    .dashboard-table, .dashboard-table tbody, .dashboard-table tr, .dashboard-table td {
        display: block;
        width: 100%;
    }

        .dashboard-table tr {
            margin-bottom: 1rem;
            border: 1px solid #ddd;
            border-radius: var(--border-radius-sm);
            padding: 0.5rem;
        }

        .dashboard-table td {
            text-align: right !important;
            position: relative;
            padding-left: 50%;
            border: none;
            border-bottom: 1px solid #eee;
        }

            .dashboard-table td:last-child {
                border-bottom: none;
            }

            .dashboard-table td:before {
                content: attr(data-label); /* Requires data-label attributes in JS */
                position: absolute;
                left: 0;
                width: 45%;
                padding-left: 1rem;
                font-weight: bold;
                text-align: left;
            }
}
