/* CSS para Bastify Tools */
.menu a.bastifytools-b {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    min-width: 54px;
}

a.bastifytools-b:before {
    content: "B";
    display: block;
    width: 30px;
    height: 30px;
    font-size: 24px;
    font-weight: 900;
    color: #1976d2;
    text-align: center;
    line-height: 26px;
    margin-bottom: 0px;
    margin-top: 2px;
    font-family: inherit;
}


.bastifytools-btn {
    background: none;
    border: none;
    padding: 0;
}
.bastifytools-btn img {
    width: 28px;
    height: 28px;
}

.bastifytools-page {
    --bastify-primary: #2f343b;
    --bastify-primary-dark: #1f2328;
    --bastify-ink: #181b1f;
    --bastify-muted: #5a616b;
    --bastify-surface: #f4f5f7;
    --bastify-panel: #ffffff;
    --bastify-border: #d8dce1;
    padding: 1.2rem clamp(18px, 4vw, 48px) 1.4rem;
    padding-bottom: 4.2rem;
    color: var(--bastify-ink);
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.bastifytools-page > h1 {
    margin: 0;
    padding: 0.35rem 0 0.2rem;
    font-size: 1.85rem;
    color: var(--bastify-ink);
    letter-spacing: -0.02em;
}

.bastifytools-subtitle {
    margin: 0;
    color: var(--bastify-muted);
    font-size: 0.95rem;
    max-width: 760px;
}

.bastifytools-dashboard {
    margin-top: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.bastifytools-nav-back {
    position: absolute;
    top: 2.75rem;
    right: clamp(42px, 7vw, 130px);
    z-index: 25;
}

.bastifytools-hamburger {
    width: 46px;
    height: 24px;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    border: none;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
    box-shadow: none;
}

.bastifytools-hamburger span {
    display: block;
    width: 38px;
    height: 3px;
    border-radius: 1px;
    background: #111111;
}

.bastifytools-hamburger:hover,
.bastifytools-hamburger:focus {
    outline: none;
    background: transparent;
    border: none;
}

.bastifytools-group {
    background: linear-gradient(180deg, #fafafa 0%, var(--bastify-surface) 100%);
    border: 1px solid var(--bastify-border);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    position: relative;
}

.bastifytools-group::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 14px 14px 0 0;
    background: linear-gradient(90deg, #5d646d 0%, #3b424a 100%);
}

.bastifytools-group-title {
    margin: 0 0 0.8rem;
    font-size: 1.12rem;
    color: var(--bastify-primary-dark);
}

.bastifytools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.bastifytools-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bastifytools-entry {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    background: var(--bastify-panel);
    border: 1px solid var(--bastify-border);
    border-radius: 11px;
    padding: 0.75rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.bastifytools-entry:hover,
.bastifytools-entry:focus {
    outline: none;
    transform: translateY(-1px);
    border-color: #b9bec6;
    background-color: #ffffff;
    box-shadow: 0 6px 16px rgba(23, 25, 28, 0.12);
}

.bastifytools-entry:focus-visible {
    box-shadow: 0 0 0 2px #747b8530, 0 6px 16px rgba(23, 25, 28, 0.14);
}

.bastifytools-entry-icon {
    width: 54px;
    height: 54px;
    margin-top: 1px;
    flex: 0 0 54px;
    padding: 12px;
    border-radius: 16px;
    background: #f1f2f4;
    border: 1px solid #d7dbe0;
}

.bastifytools-entry-text h3 {
    margin: 0;
    color: #2b3036;
    font-size: 1rem;
    line-height: 1.2;
}

.bastifytools-entry-text p {
    margin: 0.25rem 0 0;
    color: var(--bastify-muted);
    font-size: 0.86rem;
    line-height: 1.35;
}

.bastifytools-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2em;
    margin-top: 3em;
}
.bastifytools-option {
    width: 120px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    text-align: center;
    transition: box-shadow 0.2s;
}
.bastifytools-option:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.16);
}
.bastifytools-option img {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5em;
}

.bastifytools-panel {
    margin: 2rem auto 0;
    max-width: 760px;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    padding: 1.2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#bastifytools-autoresponder-panel {
    max-width: 1080px;
    width: min(1080px, 95vw);
}

#bastifytools-tickets-panel {
    max-width: 1140px;
    width: min(1140px, 95vw);
}

#bastifytools-ticket-view-panel {
    max-width: 1140px;
    width: min(1140px, 95vw);
}

#bastifytools-filters-panel {
    max-width: 1240px;
    width: min(1240px, 97vw);
}

.bastifytools-panel h2 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
}

.bastifytools-form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.9rem;
}

.bastifytools-form-row-inline {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 0.8rem;
    align-items: end;
}

.bastifytools-form-row-inline-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.bastifytools-form-row-inline-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.8rem;
}

.bastifytools-ar-subject-inline {
    grid-template-columns: 70px minmax(0, 1fr);
    align-items: center;
}

.bastifytools-ar-subject-inline label {
    margin-bottom: 0;
}

#bastifytools-autoresponder-form > .bastifytools-form-row-inline-2:first-child {
    margin-bottom: 0.35rem;
}

.bastifytools-form-row label {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.bastifytools-form-row input {
    height: 36px;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    padding: 0 0.6rem;
    width: 100%;
    box-sizing: border-box;
}

.bastifytools-form-row input[type="checkbox"] {
    width: auto;
    height: auto;
    border: 0;
    border-radius: 0;
    padding: 0;
}

.bastifytools-form-row select {
    height: 36px;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    padding: 0 0.6rem;
    width: 100%;
    box-sizing: border-box;
    background: #ffffff;
}

.bastifytools-form-row textarea {
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    padding: 0.6rem;
    resize: vertical;
    min-height: 120px;
}

.bastifytools-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.bastifytools-help {
    margin-top: 0.35rem;
    font-size: 0.88rem;
}

.bastifytools-help-ok {
    color: #2f8f2f;
}

.bastifytools-help-error {
    color: #b94a48;
}

#bastifytools-ar-message {
    min-height: 360px;
    width: 100%;
}

.bastifytools-form-actions-inline {
    display: flex;
    align-items: end;
}

.bastifytools-form-actions {
    margin-top: 0.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bastifytools-list-wrapper {
    margin-top: 1rem;
    overflow-x: auto;
}

.bastifytools-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.bastifytools-table th,
.bastifytools-table td {
    border: 1px solid #e3e3e3;
    padding: 0.55rem 0.6rem;
    text-align: left;
}

.bastifytools-table thead th {
    background: #f3f5f7;
    font-weight: 700;
}

.bastifytools-table td .button {
    margin-right: 0.35rem;
}

.bastifytools-table td .button:last-child {
    margin-right: 0;
}

#bastifytools-filters-panel .bastifytools-list-wrapper {
    margin-top: 0.75rem;
}

#bastifytools-filters-panel .bastifytools-table {
    font-size: 0.84rem;
}

#bastifytools-filters-panel .bastifytools-table th,
#bastifytools-filters-panel .bastifytools-table td {
    padding: 0.38rem 0.45rem;
    line-height: 1.2;
    white-space: nowrap;
}

#bastifytools-filters-panel .bastifytools-table td .button {
    margin-right: 0.25rem;
    padding: 0.16rem 0.42rem;
    min-height: 26px;
    font-size: 0.78rem;
}

#bastifytools-filters-panel .bastifytools-table td:last-child {
    white-space: nowrap;
    width: 1%;
}

.bastifytools-ticket-view {
    background: #fcfcfd;
}

.bastifytools-ticket-view-header {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.9rem;
    flex-wrap: wrap;
}

.bastifytools-ticket-view-headline h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #1f2328;
}

.bastifytools-ticket-view-headline p {
    margin: 0.22rem 0 0;
    color: #5a616b;
    font-size: 0.85rem;
}

.bastifytools-ticket-thread {
    margin-top: 0.6rem;
    max-height: 56vh;
    overflow: auto;
    border: 1px solid #dde2e8;
    border-radius: 12px;
    background: #f6f8fa;
    padding: 0.75rem;
}

.bastifytools-ticket-thread-empty {
    text-align: center;
    color: #5a616b;
    padding: 1rem 0.6rem;
}

.bastifytools-ticket-message {
    border: 1px solid #dde2e8;
    border-radius: 12px;
    background: #ffffff;
    padding: 0.7rem 0.8rem;
    margin-bottom: 0.65rem;
}

.bastifytools-ticket-row {
    display: flex;
    margin-bottom: 0.65rem;
}

.bastifytools-ticket-row:last-child {
    margin-bottom: 0;
}

.bastifytools-ticket-row-client {
    justify-content: flex-end;
}

.bastifytools-ticket-row-support {
    justify-content: flex-start;
}

.bastifytools-ticket-row .bastifytools-ticket-message {
    margin-bottom: 0;
    max-width: min(88%, 820px);
}

.bastifytools-ticket-message-client {
    background: #ffffff;
    border-color: #cfd8e3;
    border-bottom-right-radius: 6px;
}

.bastifytools-ticket-message-support {
    background: #eef2f6;
    border-color: #d7dee7;
    border-bottom-left-radius: 6px;
}

.bastifytools-ticket-message:last-child {
    margin-bottom: 0;
}

.bastifytools-ticket-message-meta {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin-bottom: 0.38rem;
    color: #5a616b;
    font-size: 0.82rem;
}

.bastifytools-ticket-message-author {
    font-weight: 700;
    color: #2a2f35;
}

.bastifytools-ticket-message-sep {
    color: #9aa2ad;
}

.bastifytools-ticket-message-body {
    color: #1f2328;
    line-height: 1.42;
    white-space: pre-wrap;
    word-break: break-word;
}

.bastifytools-ticket-reply {
    margin-top: 0.95rem;
}

.bastifytools-ticket-reply textarea {
    min-height: 130px;
}

.bastifytools-empty {
    text-align: center;
    color: #667;
}

.bastifytools-table-loading-cell {
    text-align: center;
    color: #4c5663;
    font-weight: 600;
}

.bastifytools-inline-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #c7d0da;
    border-top-color: #5a6573;
    border-radius: 50%;
    animation: bastifytools-spin 0.8s linear infinite;
    vertical-align: text-bottom;
    margin-right: 0.4rem;
}

@keyframes bastifytools-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.bastifytools-footer {
    position: fixed;
    left: 80px;
    right: 0;
    bottom: 0;
    padding: 0.9rem 1rem;
    border-top: 1px solid var(--bastify-border);
    color: var(--bastify-muted);
    font-size: 0.85rem;
    text-align: left;
    background: var(--bastify-surface);
    z-index: 1;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.bastifytools-footer-row {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0.9rem;
}

.bastifytools-footer-progress {
    flex: 0 0 10%;
    max-width: 10%;
    min-width: 110px;
}

.bastifytools-footer-progress-text {
    font-size: 0.78rem;
    color: var(--bastify-muted);
    text-align: left;
    line-height: 1.2;
    white-space: nowrap;
}

.bastifytools-footer-progress-bar {
    height: 8px;
    border-radius: 6px;
    background: #dfe4ea;
    overflow: hidden;
}

.bastifytools-footer-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #5d646d 0%, #3b424a 100%);
    border-radius: 6px;
}

.bastifytools-footer-version {
    text-align: right;
    white-space: nowrap;
    margin-left: auto;
}

.bastifytools-footer-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.bastifytools-footer-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

@media (max-width: 900px) {
    .bastifytools-footer {
        left: 0;
    }

    .bastifytools-footer-progress {
        flex-basis: 40%;
        max-width: 40%;
        min-width: 160px;
    }
}

.button-delete {
    background: #f3f4f6;
    border-color: #c8cdd3;
    color: #2f343b;
}

.bastifytools-action-btn {
    min-width: 30px;
    height: 28px;
    padding: 0.12rem 0.38rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.bastifytools-action-icon {
    font-size: 0.9rem;
    line-height: 1;
    pointer-events: none;
}

@media (max-width: 900px) {
    .bastifytools-page {
        padding-left: 20px;
        padding-right: 20px;
    }

    .bastifytools-nav-back {
        right: 20px;
        top: 2.25rem;
    }

    .bastifytools-page > h1 {
        font-size: 1.55rem;
    }

    .bastifytools-subtitle {
        font-size: 0.9rem;
    }

    .bastifytools-grid,
    .bastifytools-grid-two {
        grid-template-columns: 1fr;
    }

    .bastifytools-form-row-inline,
    .bastifytools-form-row-inline-2,
    .bastifytools-form-row-inline-3 {
        grid-template-columns: 1fr;
    }

    .bastifytools-ticket-thread {
        max-height: 48vh;
        padding: 0.6rem;
    }
}
