/* =========================================================
   FISCOMM ADMIN — BRAND DESIGN SYSTEM v1.1.0
   Matches dev.v2.platform.fiscomm.rs
   Primary teal: #0d9488  |  Dark teal: #0f766e  |  Light bg: #f8fafc
   ========================================================= */

/* ── Layout ─────────────────────────────────────────────── */

.fiscomm-admin-wrapper {
    margin: 20px 20px 20px 0;
}

.fiscomm-admin-container {
    display: flex;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 8px rgba(15, 118, 110, 0.06);
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
}

/* ── Sidebar Navigation ──────────────────────────────────── */

.fiscomm-admin-nav {
    flex: 0 0 230px;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
}

/* Global search */
.fiscomm-global-search-wrap {
    position: relative;
    padding: 14px 12px 10px;
    border-bottom: 1px solid #e2e8f0;
}

.fiscomm-global-search {
    width: 100%;
    min-height: 36px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 13px;
    color: #1e293b;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.fiscomm-global-search::placeholder { color: #94a3b8; }

.fiscomm-global-search:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15);
    background: #ffffff;
    outline: none;
}

.fiscomm-global-search-results {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 56px;
    z-index: 200;
    max-height: 340px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.fiscomm-global-search-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
}

.fiscomm-global-search-item:last-child { border-bottom: 0; }

.fiscomm-global-search-item:hover { background: #f0fdfa; }

.fiscomm-global-search-item-title {
    color: #1e293b;
    font-size: 13px;
    font-weight: 600;
}

.fiscomm-global-search-item-section {
    color: #0d9488;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fiscomm-global-search-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 3px;
}

.fiscomm-global-search-tag {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 999px;
    border: 1px solid #ccfbf1;
    background: #f0fdfa;
    color: #0f766e;
    font-size: 10px;
}

.fiscomm-global-search-empty {
    padding: 12px;
    color: #94a3b8;
    font-size: 12px;
}

/* Nav tabs */
.fiscomm-admin-nav-tabs {
    margin: 0;
    padding: 10px 0;
    list-style: none;
}

.fiscomm-admin-nav-tabs li {
    margin: 0;
    padding: 0;
    display: block;
}

.fiscomm-admin-nav-tabs li a {
    display: block;
    padding: 10px 16px;
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    font-size: 13px;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.fiscomm-admin-nav-tabs li a:hover {
    background: #f0fdfa;
    color: #0d9488;
    border-left-color: #99f6e4;
}

.fiscomm-admin-nav-tabs li.active a {
    background: #f0fdfa;
    color: #0d9488;
    border-left-color: #0d9488;
    font-weight: 600;
}

/* Category headers */
.fiscomm-category-header {
    background: transparent;
    border-bottom: 0;
    margin-top: 16px;
    border-radius: 0;
}

.fiscomm-category-header:first-child { margin-top: 0; }

.fiscomm-category-title {
    display: block;
    padding: 6px 16px 4px;
    font-weight: 600;
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: transparent;
    border-left: 3px solid transparent;
    cursor: pointer;
    position: relative;
}

.fiscomm-category-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #cbd5e1;
    font-size: 12px;
    transition: transform 0.2s ease-in-out;
}

.fiscomm-category-header.collapsed .fiscomm-category-toggle {
    transform: translateY(-50%) rotate(-90deg);
}

.fiscomm-category-header:hover .fiscomm-category-title {
    color: #64748b;
}

/* Sub-items */
.fiscomm-sub-item {
    margin: 0;
    padding: 0;
    position: relative;
    display: block;
}

.fiscomm-sub-item a .dashicons {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    color: #94a3b8;
    display: inline-block;
    line-height: 1;
    transition: color 0.15s;
    flex-shrink: 0;
}

.fiscomm-sub-item a {
    font-size: 13px;
    padding: 10px 16px !important;
    display: flex;
    align-items: center;
    min-height: 40px;
    box-sizing: border-box;
    color: #475569;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    padding-left: 40px !important;
    font-weight: 400;
    position: relative;
    z-index: 10;
    cursor: pointer;
    border-radius: 0;
    margin-right: 0;
}

.fiscomm-sub-item a:hover {
    background: #f0fdfa;
    color: #0d9488;
    border-left-color: #99f6e4;
}

.fiscomm-sub-item a:hover .dashicons { color: #0d9488; }

.fiscomm-sub-item.active a {
    background: #f0fdfa;
    color: #0d9488;
    border-left-color: #0d9488;
    font-weight: 600;
    margin: 0;
    min-height: 40px;
    padding: 10px 16px !important;
    padding-left: 40px !important;
    border-radius: 0;
}

.fiscomm-sub-item.active a .dashicons { color: #0d9488; }

/* Log sidebar nav */
.fiscomm-log-nav-title {
    padding: 14px 16px 6px;
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 4px;
}

.fiscomm-log-nav-list { list-style: none; margin: 0; padding: 6px 0; }
.fiscomm-log-nav-list li { margin: 0; padding: 0; }

.fiscomm-log-nav-list a {
    display: block;
    padding: 9px 16px;
    color: #475569;
    text-decoration: none;
    font-size: 13px;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.fiscomm-log-nav-list a:hover {
    background: #f0fdfa;
    color: #0d9488;
    border-left-color: #99f6e4;
}

.fiscomm-log-nav-list a.active {
    background: #f0fdfa;
    color: #0d9488;
    border-left-color: #0d9488;
    font-weight: 600;
}

.fiscomm-log-nav-empty {
    padding: 12px 16px;
    color: #94a3b8;
    font-size: 13px;
    font-style: italic;
}

/* ── Main Content Area ───────────────────────────────────── */

.fiscomm-admin-content {
    flex: 1;
    padding: 20px 28px 28px;
    background-color: #f8fafc;
    min-width: 0;
}

/* ── Hero Section ────────────────────────────────────────── */

.fiscomm-section-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 20px;
    padding: 22px 24px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(15, 118, 110, 0.06);
}

.fiscomm-section-hero__eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    color: #0d9488;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fiscomm-section-hero__title {
    margin: 0 0 6px;
    font-size: 22px;
    line-height: 1.25;
    color: #0f172a;
}

.fiscomm-section-hero__description {
    margin: 0;
    max-width: 640px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.fiscomm-section-hero__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 10px;
    flex-shrink: 0;
}

/* ── API Key Info Card ───────────────────────────────────── */

.fiscomm-api-key-info-card {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 8px;
    font-size: 13px;
    color: #134e4a;
    flex-wrap: wrap;
}

.fiscomm-api-key-info-card__status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    background: #0d9488;
    color: #fff;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.fiscomm-api-key-info-card__status::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #5eead4;
    border-radius: 50%;
}

.fiscomm-api-key-info-card__company {
    font-weight: 600;
    color: #0f172a;
}

.fiscomm-api-key-info-card__shop {
    color: #475569;
}

.fiscomm-api-key-info-card__keyname {
    color: #94a3b8;
    font-size: 12px;
}

.fiscomm-api-key-info-card__sep {
    color: #cbd5e1;
    font-size: 12px;
    user-select: none;
}

.fiscomm-start-tour {
    min-height: 36px !important;
    padding: 0 16px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    background: #f0fdfa !important;
    border-color: #99f6e4 !important;
    color: #0f766e !important;
    box-shadow: none !important;
    transition: background 0.15s, border-color 0.15s !important;
}

.fiscomm-start-tour:hover {
    background: #ccfbf1 !important;
    border-color: #0d9488 !important;
    color: #0f766e !important;
}

.fiscomm-section-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f0fdfa;
    color: #0f766e;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid #99f6e4;
}

.fiscomm-section-badge--muted {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

/* ── Breadcrumb ──────────────────────────────────────────── */

.fiscomm-breadcrumb {
    background: #ffffff;
    padding: 9px 14px;
    margin-bottom: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.fiscomm-breadcrumb-item {
    display: inline-flex;
    align-items: center;
    color: #0d9488;
    text-decoration: none;
}

.fiscomm-breadcrumb-item:hover { color: #0f766e; }

.fiscomm-breadcrumb-item.current { color: #475569; font-weight: 600; }

.fiscomm-breadcrumb-item .dashicons { margin-right: 5px; font-size: 16px; width: 16px; height: 16px; }

.fiscomm-breadcrumb-separator { margin: 0 8px; color: #cbd5e1; }

/* ── Settings Form ───────────────────────────────────────── */

.fiscomm-settings-form .form-table {
    margin-top: 20px;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.fiscomm-settings-card-gap td {
    height: 20px;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
}

.fiscomm-settings-table .fiscomm-settings-card {
    background: #ffffff;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.06);
    outline: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.fiscomm-settings-table .fiscomm-settings-card-title th {
    padding: 0;
    border-bottom: 1px solid #f1f5f9;
}

.fiscomm-settings-card-heading {
    padding: 18px 22px 14px;
    background: #ffffff;
    border-left: 4px solid #0d9488;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.fiscomm-settings-card-heading:hover { background: #fafafa; }

.fiscomm-settings-card-heading h2 {
    margin: 0 0 4px;
    font-size: 16px;
    color: #0f172a;
}

.fiscomm-settings-card-heading p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.fiscomm-card-chevron {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 3px;
    color: #cbd5e1;
    transition: transform 0.3s ease, color 0.15s;
    pointer-events: none;
}

.fiscomm-settings-card-heading:hover .fiscomm-card-chevron { color: #94a3b8; }

.fiscomm-settings-card.is-collapsed .fiscomm-card-chevron {
    transform: rotate(-90deg);
}

/* Hide rows when collapsed */
.fiscomm-settings-card.is-collapsed tr:not(.fiscomm-settings-card-title) {
    display: none;
}

.fiscomm-settings-card.is-collapsed .fiscomm-settings-card-title th {
    border-bottom: none;
}

/* Open: rows fade + slide in */
.fiscomm-settings-card:not(.is-collapsed):not(.is-collapsing) tr:not(.fiscomm-settings-card-title) {
    animation: fiscomm-row-in 0.3s ease both;
}

/* Close: rows fade + slide out */
.fiscomm-settings-card.is-collapsing tr:not(.fiscomm-settings-card-title) {
    animation: fiscomm-row-out 0.25s ease both;
    pointer-events: none;
}

@keyframes fiscomm-row-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fiscomm-row-out {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-4px); }
}

.fiscomm-settings-form .form-table th {
    padding: 18px 10px 18px 0;
    width: 240px;
    vertical-align: top;
    color: #374151;
    font-weight: 600;
    font-size: 13px;
}

.fiscomm-settings-form .form-table td { padding: 14px 10px; }

.fiscomm-settings-table .fiscomm-settings-card tr {
    background: #ffffff !important;
}

.fiscomm-settings-table .fiscomm-settings-card tr:not(.fiscomm-settings-card-title) th,
.fiscomm-settings-table .fiscomm-settings-card tr:not(.fiscomm-settings-card-title) td {
    border-top: 1px solid #f1f5f9;
    padding: 20px 22px;
    background: #ffffff;
}

.fiscomm-settings-table .fiscomm-settings-card tr:not(.fiscomm-settings-card-title):first-of-type th,
.fiscomm-settings-table .fiscomm-settings-card tr:not(.fiscomm-settings-card-title):first-of-type td {
    border-top: 0;
}

/* Form inputs */
.fiscomm-settings-form input.regular-text,
.fiscomm-settings-form select.regular-text,
.fiscomm-settings-form textarea.large-text {
    max-width: 440px;
    border-radius: 7px;
    border-color: #cbd5e1;
    padding: 7px 11px;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-size: 13px;
    background: #ffffff;
    color: #1e293b;
}

.fiscomm-settings-form input.regular-text:focus,
.fiscomm-settings-form select.regular-text:focus,
.fiscomm-settings-form textarea.large-text:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15);
    outline: none;
}

.fiscomm-multiselect { min-height: 140px; }

.fiscomm-settings-form .description { margin-top: 7px; color: #64748b; font-size: 12px; }

/* Save button */
.fiscomm-settings-form p.submit {
    padding: 18px 0;
    margin-top: 8px;
    border-top: 0;
}

.fiscomm-settings-form p.submit .button-primary {
    min-height: 38px;
    padding: 0 20px;
    border-radius: 7px;
    font-weight: 600;
    font-size: 13px;
    background: #0d9488;
    border-color: #0d9488;
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(13, 148, 136, 0.25);
    transition: background 0.15s, box-shadow 0.15s;
}

.fiscomm-settings-form p.submit .button-primary:hover {
    background: #0f766e;
    border-color: #0f766e;
    box-shadow: 0 3px 10px rgba(13, 148, 136, 0.35);
}

.fiscomm-settings-form p.submit .button-primary:focus {
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.25);
    outline: none;
}

/* Settings search */
.fiscomm-settings-search-wrap { margin: 0 0 18px; }

.fiscomm-settings-search {
    width: 100%;
    max-width: 480px;
    min-height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 0 15px;
    background: #ffffff;
    font-size: 13px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.fiscomm-settings-search:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15);
    outline: none;
}

.fiscomm-settings-search-empty {
    margin: 8px 0 16px;
    padding: 11px 14px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    background: #f8fafc;
    font-size: 13px;
}

/* Help tip & tooltip */
.fiscomm-help-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 6px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0d9488;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    transition: border-color 0.15s, background 0.15s;
}

.fiscomm-help-tip:hover {
    border-color: #0d9488;
    background: #f0fdfa;
}

.fiscomm-help-tip:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.20);
}

.fiscomm-rich-tooltip {
    position: absolute;
    z-index: 100000;
    max-width: 320px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #0f766e;
    background: #134e4a;
    color: rgba(255, 255, 255, 0.90);
    font-size: 12px;
    line-height: 1.5;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.20);
}

.fiscomm-rich-tooltip strong { color: #5eead4; }

/* Setting tags */
.fiscomm-setting-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.fiscomm-setting-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f0fdfa;
    color: #0f766e;
    border: 1px solid #99f6e4;
    font-size: 11px;
    line-height: 1.5;
}

/* ── System Info & Logs ──────────────────────────────────── */

.fiscomm-log-content {
    flex: 1;
    padding: 20px 22px;
    background: #f8fafc;
    min-width: 0;
}

.fiscomm-system-info-content { padding: 20px; }

.fiscomm-log-actions { margin-bottom: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fiscomm-log-actions form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }

.fiscomm-log-actions input[type="date"],
.fiscomm-log-actions input[type="search"] {
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    padding: 6px 10px;
    font-size: 13px;
    background: #ffffff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.fiscomm-log-actions input[type="date"]:focus,
.fiscomm-log-actions input[type="search"]:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15);
    outline: none;
}

.fiscomm-log-header {
    padding: 12px 0 10px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 14px;
}

.fiscomm-log-header h2 { margin: 0; font-size: 16px; color: #0f172a; font-weight: 600; }

/* Log viewer — dark terminal matching platform data table header */
.fiscomm-log-viewer {
    background: #134e4a;
    border: 1px solid #0f766e;
    padding: 14px;
    max-height: 580px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    border-radius: 8px;
}

.fiscomm-log-viewer pre {
    margin: 0;
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 12px;
    color: #ccfbf1;
}

.fiscomm-log-line {
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(15, 118, 110, 0.35);
    padding-bottom: 4px;
    line-height: 1.5;
    color: #ccfbf1;
}

.fiscomm-log-line:last-child { border-bottom: none; }

.fiscomm-log-meta { color: #5eead4; font-weight: bold; margin-right: 10px; }
.fiscomm-log-content-body { word-break: break-word; }

.fiscomm-log-accordion {
    margin-top: 5px;
    background: #0f766e;
    border: 1px solid #0d9488;
    border-radius: 5px;
}

.fiscomm-log-accordion summary {
    padding: 5px 10px;
    cursor: pointer;
    color: #ccfbf1;
    font-weight: 500;
    font-size: 12px;
    user-select: none;
}

.fiscomm-log-accordion pre {
    margin: 0;
    padding: 10px;
    background: transparent;
    color: #ccfbf1;
    font-size: 12px;
    overflow-x: auto;
}

.fiscomm-log-level-error   { color: #fca5a5; }
.fiscomm-log-level-warning { color: #fcd34d; }
.fiscomm-log-level-debug   { color: #5eead4; }
.fiscomm-log-level-info    { color: #a5f3fc; }

/* ── Collapsible Sections ────────────────────────────────── */

.fiscomm-collapsible-section {
    border: 1px solid #e2e8f0;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.fiscomm-collapsible-header {
    background: #f8fafc;
    padding: 13px 18px;
    cursor: pointer;
    font-size: 14px;
    margin: 0;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: #0f172a;
    user-select: none;
    transition: background 0.15s;
}

.fiscomm-collapsible-header:hover { background: #f0fdfa; }
.fiscomm-collapsible-header.active { background: #f0fdfa; color: #0f766e; }

.fiscomm-collapsible-content { padding: 18px; display: none; background: #ffffff; }

/* ── No Account Notice ───────────────────────────────────── */

.fiscomm-no-account-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 0 0 20px;
    padding: 18px 20px;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-left: 4px solid #0d9488;
    border-radius: 10px;
}

.fiscomm-no-account-notice__icon {
    font-size: 24px;
    flex-shrink: 0;
    line-height: 1.2;
    margin-top: 2px;
}

.fiscomm-no-account-notice__body strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #0f766e;
    margin-bottom: 4px;
}

.fiscomm-no-account-notice__body p {
    margin: 0 0 12px;
    color: #134e4a;
    font-size: 13px;
    line-height: 1.55;
}

.fiscomm-no-account-notice__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Setup Warning ───────────────────────────────────────── */

.fiscomm-setup-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 18px;
    padding: 12px 16px;
    background: #fefce8;
    border: 1px solid #fde047;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #78350f;
}

.fiscomm-setup-warning__icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.fiscomm-setup-warning__body strong {
    display: block;
    font-weight: 700;
    margin-bottom: 2px;
    color: #92400e;
}

.fiscomm-setup-warning__body a {
    color: #b45309;
    font-weight: 600;
    text-decoration: underline;
}

.fiscomm-setup-warning__body a:hover { color: #78350f; }

/* ── Notices ─────────────────────────────────────────────── */

.fiscomm-updated {
    background: #f0fdfa;
    border-left: 4px solid #0d9488;
    padding: 10px 18px;
    margin: 14px 0;
    box-shadow: 0 1px 4px rgba(13, 148, 136, 0.08);
    border-radius: 0 6px 6px 0;
    color: #134e4a;
}

.fiscomm-error {
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    padding: 10px 18px;
    margin: 14px 0;
    box-shadow: 0 1px 4px rgba(220, 38, 38, 0.08);
    border-radius: 0 6px 6px 0;
}

.fiscomm-error p { margin: 0; color: #333; }
.fiscomm-error strong { color: #dc2626; }

.fiscomm-notice-info {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 10px 18px;
    margin: 14px 0;
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.08);
    border-radius: 0 6px 6px 0;
}

/* ── Toast Notifications ─────────────────────────────────── */

.fiscomm-toast-container {
    position: fixed;
    top: 46px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 360px;
    width: 100%;
}

.fiscomm-toast {
    pointer-events: all;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 15px;
    border-radius: 9px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12), 0 1px 4px rgba(15, 23, 42, 0.06);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    animation: fiscomm-toast-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    transition: opacity 0.25s ease, transform 0.25s ease;
    cursor: pointer;
    word-break: break-word;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.fiscomm-toast.is-exiting {
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
}

@keyframes fiscomm-toast-in {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

.fiscomm-toast--success { border-left: 4px solid #0d9488; }
.fiscomm-toast--error   { border-left: 4px solid #dc2626; }
.fiscomm-toast--warning { border-left: 4px solid #f59e0b; }
.fiscomm-toast--info    { border-left: 4px solid #3b82f6; }

.fiscomm-toast__icon { font-size: 16px; flex-shrink: 0; line-height: 1.3; margin-top: 1px; }
.fiscomm-toast__body { flex: 1; }

.fiscomm-toast__title { font-weight: 700; display: block; margin-bottom: 2px; color: #0f172a; }
.fiscomm-toast__message { display: block; color: #475569; }

.fiscomm-toast__close {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.35;
    padding: 0;
    line-height: 1;
    font-size: 18px;
    flex-shrink: 0;
    color: #475569;
    margin-left: 4px;
    margin-top: -1px;
    transition: opacity 0.15s;
}

.fiscomm-toast__close:hover { opacity: 0.80; }

/* ── Meta Box — Order Page ───────────────────────────────── */

.fiscomm-mb-container {
    padding: 14px;
    background: #f8fafc;
    border-radius: 8px;
}

.fiscomm-mb-header {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid #0d9488;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.fiscomm-mb-header__title { margin: 0 0 2px; color: #0f172a; font-size: 14px; font-weight: 700; }
.fiscomm-mb-header__subtitle { margin: 0; color: #64748b; font-size: 12px; }
.fiscomm-mb-header__badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.fiscomm-mb-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
    line-height: 1.5;
}

.fiscomm-mb-badge--training      { background: #fef9c3; color: #854d0e; border-color: #fde68a; }
.fiscomm-mb-badge--normal        { background: #f0fdfa; color: #0f766e; border-color: #99f6e4; }
.fiscomm-mb-badge--fiscalizable  { background: #f0fdf4; color: #166534; border-color: #86efac; }
.fiscomm-mb-badge--not-fiscal    { background: #fef2f2; color: #991b1b; border-color: #fca5a5; }
.fiscomm-mb-badge--foreign       { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }
.fiscomm-mb-badge--latest        { background: #0d9488; color: #fff; border-color: #0d9488; font-size: 10px; }
.fiscomm-mb-badge--fiscalized    { background: #0d9488; color: #fff; border-color: #0d9488; font-size: 10px; }
.fiscomm-mb-badge--unfiscalized  { background: #dc2626; color: #fff; border-color: #dc2626; font-size: 10px; }

.fiscomm-mb-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    border: 1px solid transparent;
}

.fiscomm-mb-alert--success {
    background: #f0fdfa;
    border-color: #99f6e4;
    color: #134e4a;
}

.fiscomm-mb-alert--warning {
    background: #fef9c3;
    border-color: #fde68a;
    color: #854d0e;
}

.fiscomm-mb-alert__icon { font-size: 20px; flex-shrink: 0; line-height: 1.2; }

.fiscomm-mb-alert__title {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 3px;
    display: block;
    color: #0f172a;
}

.fiscomm-mb-alert__text { margin: 0; font-size: 12px; opacity: 0.85; }

.fiscomm-mb-preview {
    margin-bottom: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.fiscomm-mb-preview__header {
    padding: 9px 14px 7px;
    border-bottom: 2px solid #0d9488;
    background: #f0fdfa;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.fiscomm-mb-preview table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 1.5; margin: 0; }
.fiscomm-mb-preview thead tr { border-bottom: 1px solid #e2e8f0; color: #64748b; background: #134e4a; }
.fiscomm-mb-preview thead th { padding: 8px 14px; font-weight: 600; text-align: left; color: #ccfbf1; }
.fiscomm-mb-preview thead th:nth-child(2) { text-align: center; width: 50px; }
.fiscomm-mb-preview thead th:last-child    { text-align: right; }
.fiscomm-mb-preview tbody td { padding: 8px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.fiscomm-mb-preview tbody td:nth-child(2) { text-align: center; }
.fiscomm-mb-preview tbody td:last-child    { text-align: right; }
.fiscomm-mb-preview tfoot th { padding: 10px 14px; font-size: 13px; }
.fiscomm-mb-preview tfoot .fiscomm-total-label { text-align: left; }
.fiscomm-mb-preview tfoot .fiscomm-total-value { text-align: right; color: #0d9488; font-weight: 700; }

.fiscomm-mb-tip {
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    color: #0f766e;
    padding: 9px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 12px;
    line-height: 1.5;
}

.fiscomm-mb-remote-warning {
    background: #fef9c3;
    border: 1px solid #fde68a;
    color: #854d0e;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 12px;
}

.fiscomm-mb-sync-area { margin-top: 10px; display: flex; align-items: center; gap: 8px; }

.fiscomm-mb-docs {
    margin-bottom: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
}

.fiscomm-mb-docs__title {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 7px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.fiscomm-mb-doc-item { margin-bottom: 10px; }
.fiscomm-mb-doc-item:last-child { margin-bottom: 0; }

.fiscomm-mb-doc-item__label { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-weight: 600; color: #1e293b; font-size: 12px; }
.fiscomm-mb-doc-item__links { margin-left: 20px; display: flex; gap: 12px; flex-wrap: wrap; }

.fiscomm-mb-doc-link {
    color: #0d9488;
    text-decoration: none;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
    font-weight: 500;
}

.fiscomm-mb-doc-link:hover { color: #0f766e; text-decoration: underline; }
.fiscomm-mb-doc-link--pdf { color: #dc2626; }
.fiscomm-mb-doc-link--pdf:hover { color: #b91c1c; }

.fiscomm-mb-doc-empty { margin-left: 20px; color: #94a3b8; font-style: italic; font-size: 12px; display: flex; align-items: center; gap: 5px; }

.fiscomm-mb-invoice-card {
    margin-bottom: 7px;
    padding: 9px 11px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    transition: border-color 0.15s;
}

.fiscomm-mb-invoice-card:hover { border-color: #0d9488; }
.fiscomm-mb-invoice-card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.fiscomm-mb-invoice-card__name { font-weight: 600; color: #1e293b; font-size: 12px; }
.fiscomm-mb-invoice-card__links { display: flex; gap: 12px; flex-wrap: wrap; }
.fiscomm-mb-invoice-card__actions { margin-top: 7px; display: flex; align-items: center; gap: 8px; }

.fiscomm-mb-form { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 14px; }
.fiscomm-mb-form-section { margin-bottom: 20px; }
.fiscomm-mb-form-section:last-of-type { margin-bottom: 0; }

.fiscomm-mb-form-section__title {
    margin: 0 0 10px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 7px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fiscomm-mb-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fiscomm-mb-form__field { display: flex; flex-direction: column; gap: 5px; }
.fiscomm-mb-form__field--full { grid-column: 1 / -1; }

.fiscomm-mb-form__label { font-weight: 600; color: #374151; font-size: 12px; display: block; }

.fiscomm-mb-form__input,
.fiscomm-mb-form__select,
.fiscomm-mb-form__textarea {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: #ffffff;
    color: #1e293b;
    font-family: inherit;
}

.fiscomm-mb-form__input:focus,
.fiscomm-mb-form__select:focus,
.fiscomm-mb-form__textarea:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15);
    outline: none;
}

.fiscomm-mb-form__hint { margin: 0; font-size: 11px; color: #94a3b8; font-style: italic; line-height: 1.4; }

.fiscomm-mb-order-info { margin: 0 0 10px; padding: 0 0 0 18px; color: #475569; font-size: 12px; line-height: 2; }
.fiscomm-mb-trigger-info { color: #0d9488; font-size: 12px; margin-top: 7px; line-height: 1.5; }

.fiscomm-mb-fiscal-modes { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 8px; }

.fiscomm-mb-fiscal-mode-row { display: flex; align-items: baseline; gap: 8px; font-size: 12px; }

.fiscomm-mb-fiscal-mode-row__badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}
.fiscomm-mb-fiscal-mode-row__badge--yes { background: #dcfce7; color: #16a34a; }
.fiscomm-mb-fiscal-mode-row__badge--no  { background: #fee2e2; color: #dc2626; }

.fiscomm-mb-fiscal-mode-row__body { color: #334155; line-height: 1.5; }

.fiscomm-mb-fiscal-mode-row__status--yes { color: #16a34a; font-weight: 600; }
.fiscomm-mb-fiscal-mode-row__status--no  { color: #dc2626; font-weight: 600; }

.fiscomm-mb-fiscal-mode-row__reason { color: #64748b; font-style: italic; }

.fiscomm-mb-status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }

.fiscomm-mb-status-card {
    padding: 9px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #ffffff;
    position: relative;
    transition: border-color 0.15s;
}

.fiscomm-mb-status-card--current { border: 2px solid #0d9488; background: #f0fdfa; }

.fiscomm-mb-status-card__current-badge {
    position: absolute;
    top: -8px;
    right: 9px;
    background: #0d9488;
    color: #fff;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.fiscomm-mb-status-card__name { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; }
.fiscomm-mb-status-card__icon { font-size: 14px; }
.fiscomm-mb-status-card__status-label { font-weight: 700; color: #1e293b; font-size: 12px; text-transform: capitalize; }
.fiscomm-mb-status-card__receipt { font-weight: 600; font-size: 11px; margin-bottom: 2px; color: #0d9488; }
.fiscomm-mb-status-card__desc { color: #94a3b8; font-size: 10px; line-height: 1.4; }

.fiscomm-mb-note {
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 5px;
    padding: 8px 11px;
    margin-top: 9px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 11px;
    color: #0f766e;
    line-height: 1.5;
}

.fiscomm-mb-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 14px;
    margin-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.fiscomm-mb-result { font-size: 12px; font-weight: 600; margin-right: auto; }
.fiscomm-mb-result--success { color: #0f766e; }
.fiscomm-mb-result--error   { color: #dc2626; }

.fiscomm-mb-inline-result {
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fiscomm-fade-in 0.2s ease;
}

.fiscomm-mb-inline-result--success {
    background: #f0fdfa;
    border-left: 4px solid #0d9488;
    color: #0f766e;
}

.fiscomm-mb-inline-result--error {
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    color: #991b1b;
}

@keyframes fiscomm-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Not-fiscalizable reasons note ──────────────────────── */

.fiscomm-mb-not-fiscal-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-left: 4px solid #f97316;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 12px;
}

.fiscomm-mb-not-fiscal-note__icon {
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #c2410c;
}

.fiscomm-mb-not-fiscal-note__title {
    display: block;
    color: #9a3412;
    margin-bottom: 4px;
}

.fiscomm-mb-not-fiscal-note__list {
    margin: 0;
    padding-left: 16px;
    color: #7c2d12;
    line-height: 1.7;
}

.fiscomm-mb-not-fiscal-note__configure-link {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 600;
    color: #9a3412;
    background: #fff;
    border: 1px solid #c2410c;
    border-radius: 3px;
    text-decoration: none;
    line-height: 1.6;
    vertical-align: middle;
}

.fiscomm-mb-not-fiscal-note__configure-link:hover {
    background: #9a3412;
    color: #fff;
    border-color: #9a3412;
    text-decoration: none;
}

/* ── Preview panel ───────────────────────────────────────── */

.fiscomm-mb-preview-panel {
    border: 1px solid #bae6fd;
    border-radius: 8px;
    background: #f0f9ff;
    margin-top: 12px;
    overflow: hidden;
}

.fiscomm-mb-preview-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 14px;
    background: #e0f2fe;
    border-bottom: 1px solid #bae6fd;
}

.fiscomm-mb-preview-panel__title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #0369a1;
}

.fiscomm-mb-preview-panel__note {
    margin: 8px 14px 0;
    font-size: 11px;
    color: #0284c7;
    font-style: italic;
}

.fiscomm-mb-preview-panel__content {
    padding: 12px 14px 14px;
}

.fiscomm-preview-loading {
    color: #64748b;
    font-style: italic;
    font-size: 12px;
    margin: 0;
}

.fiscomm-preview-training-banner {
    background: #fef9c3;
    border: 1px solid #fde047;
    border-radius: 5px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #713f12;
    margin-bottom: 10px;
}

.fiscomm-preview-text-block {
    font-size: 11px;
    color: #475569;
    margin-bottom: 8px;
}

.fiscomm-preview-text-block__label {
    font-weight: 700;
    color: #334155;
}

.fiscomm-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 10px;
}

.fiscomm-preview-table th,
.fiscomm-preview-table td {
    padding: 5px 8px;
    border: 1px solid #cbd5e1;
    text-align: left;
}

.fiscomm-preview-table thead th {
    background: #e0f2fe;
    font-weight: 700;
    color: #0369a1;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.fiscomm-preview-table tfoot th {
    background: #f1f5f9;
    font-weight: 700;
    color: #1e293b;
}

.fiscomm-preview-tax-badge {
    display: inline-block;
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.fiscomm-preview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #334155;
}

.fiscomm-preview-meta__row {
    display: flex;
    gap: 4px;
    align-items: center;
}

.fiscomm-preview-meta__label {
    font-weight: 700;
    color: #0369a1;
}

/* ── Footer ──────────────────────────────────────────────── */

.fiscomm-mb-footer {
    background: #f0fdfa;
    padding: 9px 12px;
    border-radius: 6px;
    text-align: center;
    margin-top: 14px;
    border: 1px solid #99f6e4;
}

.fiscomm-mb-footer p {
    margin: 0;
    color: #0f766e;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* ── Nav Logo ────────────────────────────────────────────── */

.fiscomm-nav-logo {
    padding: 14px 18px 12px;
    border-bottom: 1px solid #e2e8f0;
}

.fiscomm-nav-logo img {
    display: block;
    max-width: 120px;
    height: auto;
    opacity: 0.9;
}

/* ── Orders Column ───────────────────────────────────────── */

.fiscomm-grid-column { font-size: 12px; }

.fiscomm-doc-link { margin-bottom: 3px; }

.fiscomm-fiscalized-link { color: #0d9488; font-weight: 600; }

.fiscomm-quick-action { margin-top: 5px; }

.fiscomm-quick-fiscalize.button {
    background: #0d9488 !important;
    color: #ffffff !important;
    border-color: #0f766e !important;
}

.fiscomm-quick-fiscalize.button:hover {
    background: #0f766e !important;
    border-color: #134e4a !important;
}

.fiscomm-spinner {
    float: none;
    margin: 0 0 0 4px;
    vertical-align: middle;
}

.fiscomm-na { color: #cbd5e1; }

/* WooCommerce Orders row action icon */
a.button.wc-action-button-fiscomm-manual-fiscalize::after {
    content: "\26A1";
    font-size: 16px;
    line-height: 1;
}

/* ── Misc ────────────────────────────────────────────────── */

#adminmenu .wp-submenu li[data-slug="fiscomm-separator-1"] {
    border-top: 1px solid #e5e5e5;
    margin-top: 5px;
    padding-top: 5px;
}

#adminmenu .wp-submenu li[data-slug="fiscomm-separator-1"] a { display: none; }

.fiscomm-content-display { padding: 20px 0; }

.error { border-color: red !important; }
.error-message { color: red; font-size: 12px; margin-top: 5px; display: block; }

/* ── Anchor highlight ────────────────────────────────────── */

.fiscomm-setting-row--highlighted {
    outline: 1px solid #16a34a;
    border-radius: 4px;
    animation: fiscomm-anchor-fade 2.8s ease forwards;
}

@keyframes fiscomm-anchor-fade {
    0%   { outline-color: #16a34a; }
    70%  { outline-color: #16a34a; }
    100% { outline-color: transparent; }
}

/* ── Meta Box v2 — Documents Table ──────────────────────── */

.fiscomm-mb-docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin: 0;
}

.fiscomm-mb-docs-table thead tr {
    background: #134e4a;
}

.fiscomm-mb-docs-table thead th {
    padding: 7px 12px;
    font-weight: 600;
    font-size: 11px;
    color: #ccfbf1;
    text-align: left;
    letter-spacing: 0.03em;
}

.fiscomm-mb-docs-table thead th:last-child {
    width: 80px;
    text-align: center;
}

.fiscomm-mb-docs-table thead th:nth-child(2) {
    width: 100px;
}

.fiscomm-mb-docs-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s;
}

.fiscomm-mb-docs-table tbody tr:last-child {
    border-bottom: none;
}

.fiscomm-mb-docs-table tbody tr:hover {
    background: #f8fafc;
}

.fiscomm-mb-docs-table tbody td {
    padding: 8px 12px;
    vertical-align: middle;
}

.fiscomm-mb-docs-table__name {
    color: #1e293b;
    font-weight: 500;
}

.fiscomm-mb-docs-table__actions {
    text-align: center;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.fiscomm-mb-docs-table__dash {
    color: #cbd5e1;
    font-size: 14px;
}

.fiscomm-mb-docs__empty {
    margin: 0;
    padding: 12px 0 4px;
    color: #94a3b8;
    font-size: 12px;
    font-style: italic;
}

.fiscomm-mb-doc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: #64748b;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    border: 1px solid transparent;
}

.fiscomm-mb-doc-icon:hover {
    background: #f0fdfa;
    color: #0d9488;
    border-color: #99f6e4;
}

.fiscomm-mb-doc-icon .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

.fiscomm-mb-doc-icon--pdf { color: #dc2626; }
.fiscomm-mb-doc-icon--pdf:hover { background: #fef2f2; color: #b91c1c; border-color: #fca5a5; }

/* ── Meta Box v2 — Accordion ─────────────────────────────── */

.fiscomm-mb-accordion {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.fiscomm-mb-accordion__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    background: #f8fafc;
    border: none;
    border-bottom: 1px solid transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-align: left;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.fiscomm-mb-accordion__toggle:hover {
    background: #f0fdfa;
    color: #0d9488;
}

.fiscomm-mb-accordion.is-open .fiscomm-mb-accordion__toggle {
    border-bottom-color: #e2e8f0;
    color: #0f172a;
}

.fiscomm-mb-accordion__chevron {
    color: #94a3b8;
    font-size: 16px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.fiscomm-mb-accordion.is-open .fiscomm-mb-accordion__chevron {
    transform: rotate(90deg);
}

.fiscomm-mb-accordion__badge {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f0fdfa;
    color: #0f766e;
    border: 1px solid #99f6e4;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.fiscomm-mb-accordion__body {
    display: none;
    background: #ffffff;
}

.fiscomm-mb-accordion.is-open .fiscomm-mb-accordion__body {
    display: block;
}

/* ── Meta Box v2 — Fieldset / Read-only ─────────────────── */

.fiscomm-mb-fieldset {
    border: none;
    margin: 0;
    padding: 14px;
}

.fiscomm-mb-fieldset[disabled] {
    opacity: 0.7;
    pointer-events: none;
}

.fiscomm-mb-readonly-note {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 12px;
}

.fiscomm-mb-readonly-note .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #94a3b8;
}

.fiscomm-mb-readonly-note--editable {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.fiscomm-mb-readonly-note--editable .dashicons {
    color: #3b82f6;
}

.fiscomm-mb-form__field--spaced { margin-bottom: 12px; }
.fiscomm-mb-form__input--date   { max-width: 280px; }

/* ── Meta Box v2 — Sync Details ──────────────────────────── */

.fiscomm-mb-sync-details {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.fiscomm-mb-sync-details__summary {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 14px;
    background: #f8fafc;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    list-style: none;
    transition: background 0.15s, color 0.15s;
    user-select: none;
}

.fiscomm-mb-sync-details__summary::-webkit-details-marker { display: none; }

.fiscomm-mb-sync-details__summary .dashicons {
    font-size: 15px;
    width: 15px;
    height: 15px;
    color: #94a3b8;
    transition: color 0.15s;
}

.fiscomm-mb-sync-details__summary:hover {
    background: #f0fdfa;
    color: #0d9488;
}

.fiscomm-mb-sync-details__summary:hover .dashicons { color: #0d9488; }

.fiscomm-mb-sync-details[open] .fiscomm-mb-sync-details__summary {
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
}

.fiscomm-mb-sync-details__body { padding: 12px 14px; background: #fff; }

.fiscomm-mb-sync-details__desc {
    margin: 0 0 10px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.fiscomm-mb-sync-result   { margin-top: 8px; }
.fiscomm-mb-sync-candidates { margin-top: 8px; }

.fiscomm-mb-candidates-table { font-size: 12px; margin: 0; }

.fiscomm-mb-candidates-link {
    margin-left: 8px;
    font-size: 12px;
    color: #0d9488;
    text-decoration: none;
}

.fiscomm-mb-candidates-link:hover { text-decoration: underline; }

/* ── Meta Box v2 — Fiscal Caption ────────────────────────── */

.fiscomm-mb-fiscal-caption {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-right: auto;
    font-size: 11px;
    color: #94a3b8;
}

.fiscomm-mb-fiscal-caption__item { font-weight: 600; }

.fiscomm-mb-fiscal-caption__item--ok  { color: #16a34a; }
.fiscomm-mb-fiscal-caption__item--ok::before  { content: "✓ "; }
.fiscomm-mb-fiscal-caption__item--off { color: #94a3b8; }
.fiscomm-mb-fiscal-caption__item--off::before { content: "— "; }
.fiscomm-mb-fiscal-caption__sep { color: #cbd5e1; }

/* ── Meta Box v2 — Refund Warning ───────────────────────── */

.fiscomm-mb-refund-warning {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 6px;
    background: #fef3c7;
    color: #92400e;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #fcd34d;
}

.fiscomm-mb-refund-warning .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
    flex-shrink: 0;
}

/* ── Meta Box v2 — Primary Fiscalize Button ──────────────── */

.fiscomm-mb-btn-primary.button-primary {
    background: #0d9488 !important;
    border-color: #0f766e !important;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 4px rgba(13, 148, 136, 0.25) !important;
    transition: background 0.15s, box-shadow 0.15s !important;
}

.fiscomm-mb-btn-primary.button-primary:hover:not(:disabled) {
    background: #0f766e !important;
    box-shadow: 0 3px 10px rgba(13, 148, 136, 0.35) !important;
}

.fiscomm-mb-btn-primary.button-primary:disabled {
    background: #cbd5e1 !important;
    border-color: #cbd5e1 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

/* ── Meta Box v2 — Spinner & preview helpers ─────────────── */

.fiscomm-spinner--hidden { visibility: hidden; }
.fiscomm-mb-preview-panel--hidden { display: none; }

/* ── Meta Box v2 — Alert icon Dashicons ─────────────────── */

.fiscomm-mb-alert__icon.dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    line-height: 1.2;
    margin-top: 1px;
}

.fiscomm-mb-alert--success .fiscomm-mb-alert__icon.dashicons { color: #0d9488; }
.fiscomm-mb-alert--warning .fiscomm-mb-alert__icon.dashicons { color: #d97706; }

.fiscomm-mb-alert--compact {
    padding: 8px 12px;
    margin-bottom: 12px;
    margin-top: 0;
}

.fiscomm-mb-alert--compact .fiscomm-mb-alert__title {
    font-size: 12px;
}

.fiscomm-mb-alert--compact .fiscomm-mb-alert__text {
    font-size: 11px;
    margin-top: 2px;
}

.fiscomm-mb-not-fiscal-note__icon.dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 1.4;
    color: #c2410c;
    flex-shrink: 0;
    margin-top: 1px;
}

.fiscomm-mb-form-section__title .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
    color: #0d9488;
    margin-top: -1px;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 960px) {
    .fiscomm-admin-container { flex-direction: column; }

    .fiscomm-admin-nav {
        flex: auto;
        border-right: 0;
        border-bottom: 1px solid #e2e8f0;
    }

    .fiscomm-section-hero { flex-direction: column; align-items: stretch; }
    .fiscomm-section-hero__meta { justify-content: flex-start; }

    .fiscomm-settings-form .form-table th,
    .fiscomm-settings-form .form-table td { display: block; width: auto; padding: 12px 16px; }

    .fiscomm-mb-form__grid { grid-template-columns: 1fr; }
    .fiscomm-mb-status-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
    .fiscomm-mb-header { flex-direction: column; align-items: flex-start; }
    .fiscomm-toast-container { right: 10px; left: 10px; max-width: none; }
    .fiscomm-mb-form__input--date { max-width: 100%; }
    .fiscomm-mb-fiscal-caption { display: none; }
}

/* =========================================================
   DASHBOARD
   ========================================================= */

.fiscomm-dashboard {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ── Filters ─────────────────────────────────────────────── */

.fiscomm-db-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.fiscomm-db-filter-group {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.fiscomm-db-filter-btn {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    cursor: pointer;
}

.fiscomm-db-filter-btn:hover {
    background: #f0fdfa;
    border-color: #99f6e4;
    color: #0d9488;
}

.fiscomm-db-filter-btn.active {
    background: #0d9488;
    border-color: #0d9488;
    color: #ffffff;
    font-weight: 600;
}

/* ── Stat cards ──────────────────────────────────────────── */

.fiscomm-db-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.fiscomm-db-stat {
    padding: 20px 22px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.fiscomm-db-stat--sales  { border-left: 4px solid #0d9488; }
.fiscomm-db-stat--refunds { border-left: 4px solid #ef4444; }
.fiscomm-db-stat--net     { border-left: 4px solid #6366f1; }

.fiscomm-db-stat__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin-bottom: 8px;
}

.fiscomm-db-stat__count {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.1;
    margin-bottom: 4px;
}

.fiscomm-db-stat__amount {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
}

.fiscomm-db-stat--sales  .fiscomm-db-stat__count { color: #0d9488; }
.fiscomm-db-stat--refunds .fiscomm-db-stat__count { color: #ef4444; }

.fiscomm-db-stat__amount--net {
    font-size: 22px;
    font-weight: 700;
    color: #6366f1;
    margin-top: 4px;
}

/* ── Chart ───────────────────────────────────────────────── */

.fiscomm-db-chart-wrap {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px 20px 16px;
}

/* ── Table ───────────────────────────────────────────────── */

.fiscomm-db-table-wrap {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.fiscomm-db-table {
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
}

.fiscomm-db-table th {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 10px 14px !important;
}

.fiscomm-db-table td {
    padding: 10px 14px !important;
    vertical-align: middle;
    font-size: 13px;
    color: #334155;
}

.fiscomm-db-invoice-num {
    font-family: monospace;
    font-size: 12px !important;
    color: #64748b !important;
}

.fiscomm-db-amount {
    font-weight: 600 !important;
}

.fiscomm-db-amount--sale   { color: #0d9488 !important; }
.fiscomm-db-amount--refund { color: #ef4444 !important; }

.fiscomm-db-type {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.fiscomm-db-type--sale {
    background: #f0fdfa;
    color: #0f766e;
    border: 1px solid #99f6e4;
}

.fiscomm-db-type--refund {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.fiscomm-db-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 4px;
    vertical-align: middle;
}

.fiscomm-db-badge--refund {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.fiscomm-db-actions {
    display: flex;
    gap: 6px;
}

.fiscomm-db-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 9px;
    border-radius: 5px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.fiscomm-db-action-link:hover {
    background: #f0fdfa;
    border-color: #0d9488;
    color: #0d9488;
}

/* ── Pagination ──────────────────────────────────────────── */

.fiscomm-db-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px;
    border-top: 1px solid #e2e8f0;
}

.fiscomm-db-page-btn {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.fiscomm-db-page-btn:hover {
    background: #f0fdfa;
    border-color: #0d9488;
    color: #0d9488;
}

.fiscomm-db-page-info {
    font-size: 12px;
    color: #94a3b8;
}

/* ── Empty state ─────────────────────────────────────────── */

.fiscomm-db-empty {
    padding: 32px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 960px) {
    .fiscomm-db-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .fiscomm-db-stats { grid-template-columns: 1fr; }
    .fiscomm-dashboard { padding: 16px; }
}

/* ── Test order generator bar ────────────────────────────── */

.fiscomm-test-orders-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 10px 16px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    font-size: 13px;
    flex-wrap: wrap;
}

.fiscomm-test-orders-label {
    font-weight: 600;
    color: #92400e;
}

.fiscomm-test-order-count {
    width: 64px;
}

.fiscomm-btn-test-orders {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fiscomm-test-email {
    color: #6b7280;
    font-size: 11px;
}

.fiscomm-test-spinner {
    float: none !important;
}

.fiscomm-test-orders-result {
    font-size: 12px;
    max-width: 100%;
}

.fiscomm-test-orders-result.fiscomm-result-ok {
    color: #065f46;
}

.fiscomm-test-orders-result.fiscomm-result-err {
    color: #991b1b;
}

.fiscomm-test-orders-result a {
    color: #0d9488;
    text-decoration: underline;
}
