/* Management Dashboard - uses the theme's existing design tokens (see
   style.css :root) so it matches the rest of the site rather than
   looking like a bolted-on wp-admin clone. */

.swtt-dash-notice {
    padding: 12px 16px;
    border-radius: var(--swtt-radius-sm);
    font-size: 13px;
    margin: 0 0 20px;
}
.swtt-dash-notice-success { background: #e8f5ec; color: #1e6b3a; border: 1px solid #b8e0c4; }
.swtt-dash-notice-error { background: #fdecec; color: #a0261e; border: 1px solid #f3bcb8; }

.swtt-dash-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 1px solid var(--swtt-border);
    margin-bottom: 24px;
}
.swtt-dash-tabs a {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--swtt-dark);
    opacity: .6;
    border-bottom: 2px solid transparent;
}
.swtt-dash-tabs a.active {
    opacity: 1;
    border-bottom-color: var(--swtt-gold);
}
.swtt-dash-tab-logout {
    margin-left: auto;
    opacity: .5 !important;
}

/* Management Dashboard primary nav — grouped icon grid, replaces the old
   flat .swtt-dash-tabs flex-wrap list (still used as-is on the customer
   Account page's simpler tab set, left untouched). Designed mobile-first:
   groups stack full-width, tiles wrap 2-up on narrow screens without the
   ragged multi-row pill wrap the old list produced. */
.swtt-dash-nav {
    margin-bottom: 28px;
}
.swtt-dash-nav-group {
    margin-bottom: 18px;
}
.swtt-dash-nav-group-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--swtt-dark);
    opacity: .45;
    margin-bottom: 8px;
}
.swtt-dash-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}
.swtt-dash-nav-tile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: var(--swtt-radius-md);
    background: var(--swtt-cream-surface);
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--swtt-dark);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    transition: background .15s ease, border-color .15s ease;
}
.swtt-dash-nav-tile .swtt-ic {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: .7;
}
.swtt-dash-nav-tile:hover {
    background: #fff;
    border-color: var(--swtt-border);
}
.swtt-dash-nav-tile.active {
    background: var(--swtt-dark);
    color: #fff;
    border-color: var(--swtt-dark);
}
.swtt-dash-nav-tile.active .swtt-ic {
    opacity: 1;
}
.swtt-dash-nav-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--swtt-gold);
    color: #14181A;
    font-style: normal;
    font-size: 10.5px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.swtt-dash-nav-signout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--swtt-dark);
    opacity: .5;
    text-decoration: none;
}
.swtt-dash-nav-signout .swtt-ic { width: 14px; height: 14px; }
.swtt-dash-nav-signout:hover { opacity: .8; }

.swtt-dash-subtabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.swtt-dash-subtabs a {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    background: var(--swtt-cream-surface);
    color: var(--swtt-dark);
}
.swtt-dash-subtabs a.active {
    background: var(--swtt-dark);
    color: #fff;
}

.swtt-dash-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}
.swtt-dash-qa-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--swtt-dark);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
}
.swtt-dash-qa-btn .swtt-ic { width: 15px; height: 15px; }
.swtt-dash-qa-btn:hover { background: var(--swtt-primary); }

.swtt-dash-section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}
.swtt-dash-search {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--swtt-border);
    background: #fff;
    font-size: 12.5px;
    min-width: 220px;
}
.swtt-dash-search:focus {
    outline: none;
    border-color: var(--swtt-gold);
}

.swtt-dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 32px;
}
.swtt-dash-stat {
    background: #fff;
    border: 1px solid var(--swtt-border);
    border-radius: var(--swtt-radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.swtt-dash-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #888;
    font-weight: 600;
}
.swtt-dash-stat-value {
    font-family: 'Fraunces', serif;
    font-size: 26px;
    font-weight: 700;
}

.swtt-dash-section-title {
    font-family: 'Fraunces', serif;
    font-size: 18px;
    margin: 32px 0 14px;
}

.swtt-dash-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--swtt-border);
    border-radius: var(--swtt-radius-md);
}
.swtt-dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.swtt-dash-table th,
.swtt-dash-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--swtt-border);
    white-space: nowrap;
}
.swtt-dash-table tr:last-child td { border-bottom: none; }
.swtt-dash-thumb {
    width: 44px;
    height: 34px;
    object-fit: cover;
    border-radius: 4px;
}
.swtt-dash-badge {
    display: inline-block;
    background: var(--swtt-cream-surface);
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.swtt-dash-form {
    background: #fff;
    border: 1px solid var(--swtt-border);
    border-radius: var(--swtt-radius-md);
    padding: 22px;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.swtt-dash-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #555;
}
.swtt-dash-field {
    min-width: 0;
}
.swtt-dash-field input:not([type="checkbox"]):not([type="radio"]),
.swtt-dash-field select,
.swtt-dash-field textarea {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    text-overflow: ellipsis;
}
.swtt-dash-field input,
.swtt-dash-field select,
.swtt-dash-field textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--swtt-border);
    border-radius: var(--swtt-radius-sm);
    font-size: 13.5px;
    font-family: inherit;
}

#swtt-meta-credentials input[type="password"],
#swtt-meta-credentials input[type="text"] {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--swtt-border);
    border-radius: var(--swtt-radius-sm);
    font-size: 13.5px;
    font-family: inherit;
}

/* Account/details forms: keep fields inside their columns and prevent
 * long URLs/placeholders from visually overflowing adjacent fields. */
.swtt-details-form {
    width: 100%;
    box-sizing: border-box;
}
.swtt-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}
.swtt-details-grid .swtt-dash-field {
    min-width: 0;
}
.swtt-details-grid .swtt-dash-field input,
.swtt-details-grid .swtt-dash-field select,
.swtt-details-grid .swtt-dash-field textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.swtt-details-grid .swtt-dash-field input[type="url"] {
    overflow: hidden;
    text-overflow: ellipsis;
}
.swtt-details-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}
@media (max-width: 720px) {
    .swtt-details-grid {
        grid-template-columns: 1fr;
    }
}
.swtt-dash-photo-preview {
    margin-bottom: 8px;
}
.swtt-dash-photo-preview img {
    max-width: 220px;
    height: auto;
    display: block;
    border: 1px solid var(--swtt-border);
    border-radius: var(--swtt-radius-sm);
}
.swtt-dash-photo-preview span {
    color: #888;
    font-size: 12.5px;
}

.swtt-btn,
.swtt-btn-small {
    display: inline-block;
    background: var(--swtt-dark);
    color: #fff;
    border: none;
    border-radius: var(--swtt-radius-sm);
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}
.swtt-btn-small {
    padding: 5px 12px;
    font-size: 11.5px;
}
.swtt-btn-outline {
    background: transparent;
    color: var(--swtt-dark);
    border: 1px solid var(--swtt-border);
}
.swtt-btn-danger {
    background: #fdecec;
    color: #a0261e;
}

/* Small inline "?" affordance used next to a field/section label -
   native title attribute for the tooltip, so no extra JS is needed and
   the page doesn't gain a second tooltip system. Kept understated (low
   opacity, tiny) so a page with several of these doesn't look busy. */
.swtt-dash-help {
    display: inline-flex;
    vertical-align: middle;
    opacity: .45;
    cursor: help;
    margin-left: 4px;
}
.swtt-dash-help svg,
.swtt-dash-help .swtt-ic {
    width: 14px;
    height: 14px;
}
.swtt-dash-help:hover { opacity: .8; }

/* Enabled/Disabled toggle switch (Settings tab). */
.swtt-dash-toggle-row {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
}
.swtt-dash-toggle {
    position: relative;
    flex-shrink: 0;
}
.swtt-dash-toggle input {
    position: absolute;
    opacity: 0;
    width: 44px;
    height: 24px;
    margin: 0;
    cursor: pointer;
}
.swtt-dash-toggle-track {
    display: block;
    width: 44px;
    height: 24px;
    background: #ddd;
    border-radius: 999px;
    transition: background .2s ease;
}
.swtt-dash-toggle-thumb {
    display: block;
    width: 18px;
    height: 18px;
    margin: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.swtt-dash-toggle input:checked + .swtt-dash-toggle-track {
    background: var(--swtt-gold);
}
.swtt-dash-toggle input:checked + .swtt-dash-toggle-track .swtt-dash-toggle-thumb {
    transform: translateX(20px);
}

/* wp_login_form() ships unstyled outside wp-login.php - minimal styling
   so the login form on this page doesn't look broken. */
.login-username, .login-password { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.login-username label, .login-password label { font-size: 12px; font-weight: 600; color: #555; }
.login-username input, .login-password input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--swtt-border);
    border-radius: var(--swtt-radius-sm);
    font-size: 13.5px;
}
.login-remember { font-size: 12.5px; margin-bottom: 14px; }
.login-submit input[type="submit"] {
    background: var(--swtt-dark);
    color: #fff;
    border: none;
    border-radius: var(--swtt-radius-sm);
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
}

/* Templates tab — content library cards (FluentCRM/Fluent Forms/social/WhatsApp) */
.swtt-tpl-card {
    border: 1px solid var(--swtt-border);
    border-radius: var(--swtt-radius-md);
    padding: 14px 16px;
    margin-bottom: 14px;
    background: #fff;
}
.swtt-tpl-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.swtt-tpl-card-head strong {
    font-size: 13.5px;
}
.swtt-tpl-copy {
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--swtt-border);
    background: var(--swtt-cream-surface);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    color: var(--swtt-dark);
}
.swtt-tpl-copy:hover { background: var(--swtt-dark); color: #fff; }
.swtt-tpl-copy.swtt-tpl-copied { background: #1e6b3a; color: #fff; border-color: #1e6b3a; }
.swtt-tpl-note {
    font-size: 12px;
    color: #888;
    margin: 0 0 8px;
}
.swtt-tpl-subject {
    font-size: 12.5px;
    font-weight: 700;
    margin: 0 0 6px;
}
.swtt-tpl-body {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    font-size: 12.5px;
    line-height: 1.55;
    background: var(--swtt-cream-surface);
    border-radius: var(--swtt-radius-sm);
    padding: 12px 14px;
    margin: 0;
    color: #333;
}
.swtt-tpl-fieldlist {
    font-size: 12.5px;
    margin: 0 0 8px;
    padding-left: 18px;
}
.swtt-tpl-fieldlist li { margin-bottom: 3px; }

/* Support tab (template-parts/dashboard-customer/support.php) */
.swtt-support-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--swtt-dark);
    color: #fff;
    border-radius: var(--swtt-radius-md);
    padding: 20px 22px;
    margin-bottom: 22px;
}
.swtt-support-hero-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(201, 154, 62, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
}
.swtt-support-hero-icon .swtt-ic {
    width: 20px;
    height: 20px;
    color: var(--swtt-gold);
}
.swtt-support-hero .swtt-dash-section-title {
    color: #fff;
}
.swtt-support-hero-sub {
    margin: 0;
    font-size: 12.5px;
    color: rgba(255,255,255,0.7);
}

.swtt-support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 30px;
}
.swtt-support-card {
    background: #fff;
    border: 1px solid var(--swtt-border);
    border-radius: var(--swtt-radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    color: var(--swtt-dark);
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
a.swtt-support-card:hover {
    border-color: var(--swtt-gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26,26,26,0.08);
}
.swtt-support-card-accent {
    border-color: #25D366;
}
a.swtt-support-card-accent:hover {
    border-color: #25D366;
    box-shadow: 0 6px 16px rgba(37,211,102,0.18);
}
.swtt-support-card-static {
    cursor: default;
}
.swtt-support-card-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--swtt-cream-surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}
.swtt-support-card-icon .swtt-ic {
    width: 14px;
    height: 14px;
    color: var(--swtt-dark);
}
.swtt-support-card-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #888;
    font-weight: 600;
}
.swtt-support-card-value {
    font-family: 'Fraunces', serif;
    font-size: 18px;
    font-weight: 700;
}
.swtt-support-card-hint {
    font-size: 11.5px;
    color: #999;
    margin-top: 2px;
}
a.swtt-support-card:hover .swtt-support-card-hint {
    color: var(--swtt-primary);
}

.swtt-support-faq {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 640px;
}
.swtt-support-faq-item {
    background: #fff;
    border: 1px solid var(--swtt-border);
    border-radius: var(--swtt-radius-sm);
    padding: 12px 16px;
}
.swtt-support-faq-item summary {
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    list-style: none;
}
.swtt-support-faq-item summary::-webkit-details-marker { display: none; }
.swtt-support-faq-item summary::before {
    content: '+';
    display: inline-block;
    width: 16px;
    color: var(--swtt-gold);
    font-weight: 700;
}
.swtt-support-faq-item[open] summary::before { content: '\2212'; }
.swtt-support-faq-item p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin: 10px 0 0 16px;
}
.swtt-support-faq-item a { color: var(--swtt-primary); font-weight: 600; }

.swtt-support-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 26px;
    font-size: 12px;
    color: #999;
}
.swtt-support-footer .swtt-support-card-icon {
    margin-bottom: 0;
}
