/* ==========================================
   صفحه گزارش موقت — نسخه بازطراحی شده
   رعایت Design System موجود در main.css
   ========================================== */

/* جلوگیری از ارتفاع تمام‌صفحه وقتی داخل تب اپ جاسازی می‌شود */
.reports-content .tr-report-view,
.rr-detail-view.tr-report-view {
    min-height: auto !important;
    height: auto !important;
}

/* ویو جزئیات نباید صفحه را افقی باز کند؛ اسکرول فقط روی جدول */
.rr-detail-view.tr-report-view {
    overflow-x: hidden !important;
    overflow-y: visible !important;
    max-width: 100%;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.reports-content .tr-page,
.reports-content body.tr-page {
    min-height: auto;
    height: auto;
}

#tr-app {
    min-height: 100vh;
    width: 100%;
}

/* ===== صفحه گزارش ===== */
.tr-report-view {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--secondary);
}

@media (min-width: 992px) {
    .tr-report-view:not(.rr-detail-view) {
        height: 100vh;
        overflow: hidden;
    }
}

/* ===== Header حرفه‌ای با متادیتا ===== */
.tr-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    padding: 20px 24px;
}

.tr-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tr-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 200px;
}

.tr-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
}

.tr-logo img {
    max-width: 32px;
    max-height: 32px;
}

.tr-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
}

.tr-countdown-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--warning);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.tr-countdown-badge.expired {
    background: var(--danger);
}

.tr-countdown-badge.long-time {
    background: var(--success);
}

.tr-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tr-header-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tr-header-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.tr-header-toggle-icon {
    display: inline-block;
    transition: transform 0.25s ease;
    font-size: 0.7rem;
    line-height: 1;
}

.tr-header.is-collapsed .tr-header-toggle-icon {
    transform: rotate(180deg);
}

.tr-header-body {
    overflow: hidden;
    max-height: 320px;
    opacity: 1;
    transition: max-height 0.3s ease, opacity 0.25s ease, margin 0.3s ease;
}

.tr-header.is-collapsed .tr-header-body {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    pointer-events: none;
}

.tr-header.is-collapsed {
    padding-bottom: 12px;
}

.tr-user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.tr-btn-logout {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* ===== کارت اطلاعات متادیتا ===== */
.tr-metadata-card {
    background: var(--primary-light);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
}

.tr-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.tr-meta-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
}

.tr-meta-label {
    color: var(--text-light);
    font-weight: 500;
}

.tr-meta-value {
    color: var(--text);
    font-weight: 600;
}

/* ===== Toolbar دکمه‌های عملیاتی ===== */
.tr-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-top: 16px;
}

.tr-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tr-toolbar-btn:hover {
    background: var(--secondary);
    border-color: var(--primary);
    color: var(--primary);
}

.tr-toolbar-btn.primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.tr-toolbar-btn.primary:hover {
    background: var(--primary-dark);
}

.tr-toolbar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tr-toolbar-btn svg,
.tr-toolbar-btn i {
    width: 16px;
    height: 16px;
}

.tr-toolbar-btn .btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    flex-shrink: 0;
}

.tr-toolbar-btn .btn-icon svg {
    display: block;
    width: 16px;
    height: 16px;
}

/* ===== Main Content ===== */
.tr-main {
    flex: 1;
    padding: 12px;
    width: 100%;
    margin: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .tr-main {
        padding: 12px 16px 16px;
        max-width: none;
    }
}

.tr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 64px 24px;
}

.tr-status-wrap,
.tr-global-status {
    display: flex;
    justify-content: center;
    padding: 24px;
}

.tr-status-card {
    text-align: center;
    padding: 48px 24px;
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--card-shadow);
    max-width: 480px;
    width: 100%;
    border-top: 4px solid var(--danger);
}

.tr-status-card.warning {
    border-top-color: var(--warning);
}

.tr-status-card .empty-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.tr-status-card .empty-message {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ===== پنل جدول ===== */
.tr-table-panel {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* ===== Toolbar جدول (جستجو) ===== */
.tr-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    background: var(--secondary);
}

.tr-search-wrapper {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
    position: relative;
}

.tr-search {
    width: 100%;
    padding: 10px 40px 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--white);
    transition: all 0.2s ease;
}

.tr-search:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12);
}

.tr-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.tr-clear-search {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    display: none;
}

.tr-clear-search.visible {
    display: block;
}

.tr-row-count {
    font-size: 0.875rem;
    color: var(--text-light);
    white-space: nowrap;
    font-weight: 500;
}

.tr-row-count strong {
    color: var(--primary);
    font-weight: 700;
}

/* ===== جدول داینامیک ===== */
.tr-table-container {
    overflow: auto;
    flex: 1;
    min-height: 200px;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

/* ارتفاع توسط قالب یکپارچه (.rpt-scroll) کنترل می‌شود */
.rpt-table-panel .tr-table-container,
.rr-detail-view .tr-table-container {
    flex: none;
    max-height: none !important;
}

@media (min-width: 992px) {
    .tr-table-container {
        max-height: none;
    }
}

@media (max-width: 991px) {
    .tr-table-container {
        max-height: calc(100vh - 320px);
    }
}

/* ظاهر جدول از report-table.css (.rpt-table) می‌آید */
.tr-data-table.rpt-table {
    /* آماده گزارش‌ها نیز از تم یکپارچه استفاده می‌کنند */
}

.tr-sort-indicator {
    display: inline-block;
    margin-inline-start: 6px;
    font-size: 0.7rem;
    opacity: 0.45;
    vertical-align: middle;
    position: static;
    transform: none;
}

.tr-data-table tbody td.num {
    font-family: 'IRANSans', 'Vazir', monospace;
}

/* Highlight جستجو */
.tr-highlight {
    background: #fff59d;
    padding: 2px 0;
    border-radius: 2px;
    font-weight: 600;
}

/* ===== Pagination ===== */
#tr-pagination {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

#tr-pagination .btn {
    padding: 8px 16px;
    font-size: 0.875rem;
}

#tr-page-info {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* ===== Responsive Design ===== */
@media (max-width: 991px) {
    .tr-header {
        padding: 14px 16px;
    }

    .tr-header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .tr-title-group {
        width: 100%;
    }

    .tr-header-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .tr-metadata-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 14px;
    }

    .tr-toolbar {
        gap: 6px;
    }

    .tr-toolbar-btn {
        flex: 1 1 calc(50% - 6px);
        justify-content: center;
        min-width: 0;
    }

    .tr-header-toggle-label {
        display: none;
    }

    .tr-header-toggle {
        padding: 8px 10px;
    }

    .tr-main {
        padding: 10px 12px 12px;
    }

    .tr-table-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 14px;
    }

    .tr-search-wrapper {
        max-width: 100%;
        min-width: 0;
    }

    .tr-row-count {
        text-align: center;
    }

    .tr-data-table {
        font-size: 0.85rem;
        min-width: 480px;
    }

    .tr-data-table thead th,
    .tr-data-table tbody td {
        padding: 10px 12px;
    }

    .tr-toolbar-btn {
        min-height: 44px;
    }

    #tr-pagination {
        flex-direction: column;
        padding: 12px 14px;
    }

    #tr-pagination .btn {
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .tr-page-title {
        font-size: 1.15rem;
    }

    .tr-logo {
        width: 40px;
        height: 40px;
    }

    .tr-logo img {
        max-width: 28px;
        max-height: 28px;
    }

    .tr-toolbar-btn span:not([aria-hidden]) {
        display: none;
    }

    .tr-toolbar-btn {
        flex: 1 1 auto;
        padding: 10px 12px;
    }

    .tr-data-table {
        min-width: 420px;
        font-size: 0.8rem;
    }

    .tr-data-table thead th,
    .tr-data-table tbody td {
        padding: 8px 10px;
    }
}

/* ===== Toast Notification ===== */
.tr-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--card-shadow);
    z-index: 9999;
    animation: tr-toast-in 0.3s ease;
}

.tr-toast.success {
    background: var(--success);
}

@keyframes tr-toast-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ===== Print Styles (fallback — چاپ اصلی از پنجره جداگانه انجام می‌شود) ===== */
@media print {
    .tr-toolbar,
    .tr-table-toolbar,
    #tr-pagination,
    .tr-header-actions,
    .tr-toast,
    .tr-countdown-badge,
    .tr-user-name {
        display: none !important;
    }
}

/* ===== Ready Reports List ===== */
.rr-root {
    min-height: 100%;
}

.rr-list-view {
    padding: 8px 10px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 420px;
    width: 100%;
    box-sizing: border-box;
}

.rr-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #fff 70%);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.rr-hero-text {
    flex: 1;
    min-width: 0;
}

.rr-list-title {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.rr-list-subtitle {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

.rr-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 10px 14px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.rr-hero-stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.rr-hero-stat-label {
    font-size: 0.75rem;
    color: var(--text-light);
}

.rr-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.rr-toolbar-search {
    position: relative;
    flex: 1 1 240px;
    min-width: 200px;
}

.rr-toolbar-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-light);
    pointer-events: none;
    display: inline-flex;
}

.rr-toolbar-icon svg {
    width: 18px;
    height: 18px;
}

.rr-toolbar-input {
    width: 100%;
    padding: 10px 40px 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--secondary);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text);
}

.rr-toolbar-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12);
}

.rr-toolbar-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.rr-filter-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
}

.rr-select-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 180px;
}

.rr-toolbar-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 10px 38px 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.rr-toolbar-select:hover {
    border-color: #c5c9d1;
    background: #fafbfc;
}

.rr-toolbar-select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12);
}

.rr-toolbar-select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: var(--secondary);
}

.rr-select-caret {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 10px;
    height: 10px;
    transform: translateY(-60%) rotate(45deg);
    border-right: 2px solid var(--text-light);
    border-bottom: 2px solid var(--text-light);
    pointer-events: none;
}

.rr-select-wrap:focus-within .rr-select-caret {
    border-color: var(--primary);
}

.rr-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.rr-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rr-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.rr-card:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.rr-card:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12);
}

.rr-card-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rr-card-icon svg {
    width: 22px;
    height: 22px;
}

.rr-card-body {
    flex: 1;
    min-width: 0;
}

.rr-card-title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
}

.rr-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-light);
}

.rr-card-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: var(--secondary);
    border-radius: 999px;
    color: var(--text);
}

.rr-card-chip.year {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
}

.rr-card-action {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rr-card-chevron {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1;
}

.rr-year-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.rr-loading-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 8px 0 16px;
}

.rr-skeleton-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rr-skeleton-card {
    height: 88px;
    border-radius: 12px;
    background: linear-gradient(90deg, #eee 0%, #f7f7f7 50%, #eee 100%);
    background-size: 200% 100%;
    animation: rr-skeleton 1.2s ease-in-out infinite;
}

@keyframes rr-skeleton {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.rr-empty,
.rr-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 280px;
    padding: 40px 24px;
    text-align: center;
    background: var(--white);
    border: 1px dashed var(--border);
    border-radius: 12px;
    color: var(--text-light);
}

.rr-empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.rr-empty-icon svg {
    width: 28px;
    height: 28px;
}

.rr-empty .empty-title,
.rr-error .empty-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.rr-empty .empty-message,
.rr-error .empty-message {
    max-width: 420px;
    font-size: 0.9rem;
    line-height: 1.7;
}

.rr-error {
    border-color: #f5c2c7;
    background: #fff8f8;
}

.rr-error .empty-title {
    color: var(--danger);
}

.rr-detail-view.tr-report-view {
    min-height: auto;
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    background: transparent;
    max-width: 100%;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.rr-detail-view .tr-header {
    border-radius: 12px;
    margin-bottom: 12px;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.rr-detail-view .tr-main {
    padding: 0;
    max-width: 100%;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.rr-detail-view .tr-table-panel {
    margin: 0;
    max-width: 100%;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.rr-detail-view .tr-table-container {
    overflow-x: auto;
    overflow-y: auto;
    max-width: 100%;
    width: 100%;
    min-width: 0;
    max-height: none !important;
    -webkit-overflow-scrolling: touch;
}

.rr-detail-view .tr-data-table {
    width: max-content;
    min-width: 100%;
    max-width: none;
}

#ready-host,
#tab-ready,
.reports-content #tab-ready.active {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

#ready-host > .rr-root {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

@media (max-width: 720px) {
    .rr-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .rr-hero-stat {
        flex-direction: row;
        justify-content: space-between;
        gap: 8px;
    }

    .rr-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .rr-toolbar-filters {
        width: 100%;
    }

    .rr-select-wrap,
    .rr-refresh-btn {
        flex: 1;
    }

    .rr-select-wrap {
        min-width: 0;
    }

    .rr-card {
        flex-wrap: wrap;
    }

    .rr-card-action {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Login View (unused legacy cleanup) ===== */
.tr-login-view {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 24px;
}

.tr-login-container {
    width: 100%;
    max-width: 420px;
}

.tr-login-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: tr-fade-in 0.4s ease;
}

.tr-login-header {
    text-align: center;
    margin-bottom: 32px;
}

.tr-login-header .tr-logo {
    margin: 0 auto 16px;
    width: 80px;
    height: 80px;
}

.tr-login-header .tr-logo img {
    width: 100%;
    height: 100%;
}

.tr-login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px 0;
}

.tr-login-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

.tr-login-company {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 600;
    margin: 0 0 6px 0;
}

.tr-login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tr-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tr-form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.tr-form-input {
    padding: 12px 16px;
    font-size: 0.95rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.tr-form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.tr-login-btn {
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.tr-login-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.tr-login-error {
    padding: 12px;
    background: #fee;
    color: #c33;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
}

/* ===== Hidden Helper ===== */
[hidden] {
    display: none !important;
}
