.tmt-device-report-shortcode {
    margin: 32px 0;
    color: #0f172a;
}

.tmt-device-report-shortcode * {
    box-sizing: border-box;
}

.tmt-layout {
    display: grid;
    grid-template-columns: minmax(300px, 340px) 1fr;
    gap: 24px;
    align-items: start;
}

.tmt-panel {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    padding: 24px;
}

.tmt-intro {
    margin-bottom: 18px;
    color: #475569;
}

.tmt-search-form {
    display: grid;
    gap: 12px;
}

.tmt-search-form input[type="text"] {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 15px;
    outline: none;
}

.tmt-search-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.tmt-search-actions button {
    border: 0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: #2563eb;
    color: #ffffff;
}

.tmt-search-actions .tmt-secondary-button {
    background: #e2e8f0;
    color: #0f172a;
}

.tmt-search-actions button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.tmt-pdf-status {
    min-height: 18px;
    font-size: 13px;
    color: #475569;
    margin-top: 6px;
}

.tmt-pdf-status.is-active {
    color: #1d4ed8;
}

.tmt-connection-status {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
}

.tmt-status-success {
    background: #ecfdf5;
    color: #166534;
    border-color: #86efac;
}

.tmt-status-error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fca5a5;
}

.tmt-status-neutral {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.tmt-debug-box {
    margin-top: 16px;
    padding: 14px;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 12px;
}

.tmt-debug-box h3 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 15px;
}

.tmt-debug-box ul {
    margin: 0;
    padding-left: 18px;
}

.tmt-debug-box li {
    margin-bottom: 6px;
    word-break: break-word;
}

.tmt-alert,
.tmt-empty-state {
    margin-top: 16px;
    padding: 12px 14px;
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fdba74;
    border-radius: 10px;
}

.tmt-preview-empty-state {
    margin-top: 0;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #f8fafc;
    color: #475569;
    border-color: #cbd5e1;
}

.tmt-report-page-wrapper {
    overflow: auto;
    background: #f3f4f6;
    padding: 14px;
    border-radius: 16px;
}

.tmt-report-page {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    background: #ffffff;
    color: #1f2937;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
    padding: 18mm 16mm;
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: 11px;
    line-height: 1.35;
}

.tmt-report-header-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 6px;
}

.tmt-brand-block {
    flex: 0 0 auto;
}

.tmt-title-block h1 {
    margin: 0 0 4px;
    font-size: 24px;
    line-height: 1;
    font-weight: 600;
}

.tmt-title-block p {
    margin: 0;
}

.tmt-logo-box {
    width: 220px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    background: transparent;
    flex-shrink: 0;
}

.tmt-logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.tmt-logo-box-clean {
    border: 0;
    border-radius: 0;
}

.tmt-top-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 2px;
}

.tmt-summary-card {
    padding: 14px 16px;
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    border-radius: 3px;
}

.tmt-summary-card strong,
.tmt-summary-card span {
    font-size: 11px;
}

.tmt-summary-card-blue,
.summary-blue {
    background: #c7e2f2;
}

.tmt-summary-card-green,
.summary-green {
    background: #cfeec9;
}

.tmt-summary-card-red,
.summary-red {
    background: #f8d7da;
}

.tmt-summary-card-orange,
.summary-orange {
    background: #ffe5b4;
}

.tmt-report-section-flat {
    border: 0;
    border-radius: 0;
    padding: 0;
}

.tmt-report-section-flat h3 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #111827;
    font-weight: 600;
}

.tmt-grid {
    display: grid;
    gap: 10px 14px;
}

.tmt-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.tmt-span-3 {
    grid-column: span 3;
}

.tmt-span-all {
    grid-column: span 4;
}

.tmt-data-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: #c7e2f2;
    min-height: 54px;
    border-radius: 3px;
}

.tmt-data-card-green,
.card-green {
    background: #cfeec9 !important;
}

.tmt-data-card-red,
.card-red {
    background: #f8d7da !important;
}

.tmt-data-card-orange,
.card-orange {
    background: #ffe5b4 !important;
}

.tmt-data-card strong,
.tmt-data-card span,
.tmt-data-card div {
    font-size: 10.5px;
    line-height: 1.35;
    word-break: break-word;
}

.tmt-data-card-lines {
    gap: 6px;
}

.tmt-data-card-empty,
.card-empty {
    background: #eceff3 !important;
}

.summary-empty {
    background: #eceff3 !important;
}

@media (max-width: 1280px) {
    .tmt-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .tmt-panel {
        padding: 18px;
    }

    .tmt-report-page-wrapper {
        padding: 10px;
    }

    .tmt-report-header-simple {
        flex-direction: column;
        align-items: flex-start;
    }

    .tmt-top-summary-grid,
    .tmt-grid-4 {
        grid-template-columns: 1fr;
    }

    .tmt-span-3,
    .tmt-span-all {
        grid-column: span 1;
    }
}

.tmt-report-selection h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
}

.tmt-selection-list {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.tmt-selection-card {
    background: #ffffff;
    border: 1px solid #dbe3ea;
    border-radius: 12px;
    padding: 14px;
}

.tmt-selection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 10px 16px;
    align-items: center; 
}

.tmt-selection-grid > div,
.tmt-selection-grid > a,
.tmt-selection-grid > .tmt-selection-button,
.tmt-selection-grid > .tmt-selection-status {
    align-self: center;
}

.tmt-selection-card {
    background: #ffffff;
    border: 1px solid #dbe3ea;
    border-radius: 12px;
    padding: 14px 18px;
}

.tmt-selection-status {
    padding: 4px 12px;   
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 52px;  
    line-height: 1.0;
}

.tmt-selection-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 10px;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .tmt-selection-grid {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .tmt-selection-button {
        width: 100%;
    }
}

@media print {
    .tmt-search-panel {
        display: none !important;
    }

    .tmt-layout {
        display: block;
    }

    .tmt-preview-panel,
    .tmt-report-page-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    .tmt-report-page {
        box-shadow: none;
        width: 210mm;
        min-height: 297mm;
    }
}