/* ================================
   Global Styles
   ================================ */

:root {
    --primary-color: #1460ac;
    --primary-light: #1e7ecc;
    --primary-dark: #0f4d8f;
    --secondary-color: #1e7ecc;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #e8a317;
    --info-color: #3d8fd1;
    --brand-gradient: linear-gradient(135deg, #1460ac 0%, #1e7ecc 100%);
    --brand-gradient-hover: linear-gradient(135deg, #0f4d8f 0%, #1460ac 100%);
    --focus-ring: rgba(20, 96, 172, 0.25);
    --sidebar-width: 260px;
    --sidebar-bg: #0b2f57;
    --sidebar-text: #dbe7f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7fb;
    color: #1f2937;
}

/* ================================
   Wrapper Layout
   ================================ */

.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 0;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 2px 0 12px rgba(15, 77, 143, 0.15);
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
}

.sidebar-brand-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.sidebar-header {
    padding: 20px;
    background: var(--brand-gradient);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-header h5 {
    color: white;
    font-weight: 600;
}

.sidebar-nav {
    padding: 18px 14px;
    flex: 1;
}

.sidebar-nav .nav-link {
    color: var(--sidebar-text);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.25s ease;
    border-radius: 12px;
    margin-bottom: 6px;
    border-left: none;
    position: relative;
}

.sidebar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-nav .nav-link.active {
    background: linear-gradient(135deg, #1460ac 0%, #1e7ecc 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(20, 96, 172, 0.28);
}

.sidebar-nav .nav-link > i,
.sidebar-bottom .nav-link > i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.sidebar-nav-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    width: 20px;
    flex-shrink: 0;
}

.sidebar-nav .nav-link .sidebar-nav-icon-wrap i {
    margin-right: 0;
    width: 20px;
    text-align: center;
}

.sidebar-nav-icon-wrap .navbar-notification-badge {
    top: -6px;
    right: -10px;
    min-width: 16px;
    height: 16px;
    font-size: 0.6rem;
    padding: 0 4px;
    line-height: 1;
    border: 2px solid var(--sidebar-bg, #1a2332);
}

.sidebar-nav .nav-link.active .sidebar-nav-icon-wrap .navbar-notification-badge {
    border-color: #1e7ecc;
}

.sidebar-bottom {
    padding: 12px 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-bottom .nav-link {
    color: var(--sidebar-text);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 4px;
}

.sidebar-bottom .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-bottom .nav-link.active {
    background: linear-gradient(135deg, #1460ac 0%, #1e7ecc 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(20, 96, 172, 0.28);
}

.sidebar-footer {
    padding: 14px 16px 4px;
    text-align: left;
    position: static;
    width: auto;
    border-top: none;
}

.sidebar-footer small {
    display: block;
    color: rgba(219, 231, 245, 0.65);
    font-size: 0.78rem;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.navbar {
    box-shadow: 0 1px 0 rgba(20, 96, 172, 0.08);
    border-bottom: 1px solid #e8eef5;
    min-height: 72px;
}

.top-navbar .navbar-brand {
    color: #111827 !important;
    font-weight: 700;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(20, 96, 172, 0.1);
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.navbar-welcome {
    color: #6b7280;
    font-size: 0.95rem;
}

.navbar-icon-btn {
    color: #6b7280;
    text-decoration: none;
    font-size: 1.15rem;
    line-height: 1;
}

.navbar-notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: auto;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    padding: 0 6px;
}

.navbar-logout {
    color: #ef4444;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
}

.navbar-logout:hover {
    color: #dc2626;
}

.navbar-brand {
    color: var(--primary-color) !important;
    font-weight: 600;
}

.container-fluid {
    flex: 1;
    overflow-y: auto;
}

/* ================================
   Cards & Components
   ================================ */

.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    background: var(--brand-gradient);
    color: white;
    border: none;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    padding: 15px 20px;
}

.stat-card {
    text-align: center;
    padding: 30px 20px;
}

.stat-card h3 {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: bold;
    margin: 10px 0;
}

.stat-card p {
    color: #666;
    font-size: 0.95rem;
}

.stat-card.stat-success h3 {
    color: var(--success-color);
}

.stat-card.stat-warning h3 {
    color: var(--primary-light);
}

.stat-card.stat-info h3 {
    color: var(--info-color);
}

.stat-card.stat-danger h3 {
    color: var(--danger-color);
}

/* ================================
   Tables
   ================================ */

.table {
    background: white;
}

.table thead th {
    background-color: #f8f9fa;
    border: none;
    font-weight: 600;
    color: #333;
    padding: 15px;
}

.table tbody td {
    border-top: 1px solid #e9ecef;
    padding: 15px;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
}

/* ================================
   Forms
   ================================ */

.form-control,
.form-select {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem var(--focus-ring);
}

.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

/* ================================
   Buttons
   ================================ */

.btn {
    border-radius: 5px;
    font-weight: 500;
    padding: 8px 16px;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--brand-gradient);
    color: white;
}

.btn-primary:hover {
    background: var(--brand-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 96, 172, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #157347;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background-color: #d49212;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #bb2d3b;
}

.btn-info {
    background-color: var(--info-color);
    color: white;
    border: none;
}

.btn-info:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

/* ================================
   Search & Filter
   ================================ */

.search-box {
    position: relative;
}

.search-box input {
    padding-right: 40px;
}

.search-box i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* ================================
   Alerts
   ================================ */

.alert {
    border: none;
    border-radius: 5px;
    border-left: 4px solid;
    margin-bottom: 20px;
}

.alert-success {
    border-left-color: var(--success-color);
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    border-left-color: var(--danger-color);
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    border-left-color: var(--warning-color);
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    border-left-color: var(--primary-color);
    background-color: #e8f2fb;
    color: #0f4d8f;
}

/* ================================
   Pagination
   ================================ */

.pagination {
    gap: 5px;
}

.page-link {
    border: 1px solid #ddd;
    color: var(--primary-color);
    border-radius: 5px;
}

.page-link:hover {
    background-color: #f8f9fa;
    color: var(--secondary-color);
}

.page-link.active {
    background: var(--brand-gradient);
    border-color: var(--primary-color);
}

/* ================================
   Modal
   ================================ */

.modal-header {
    background: var(--brand-gradient);
    color: white;
    border: none;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.details-modal-content .modal-body {
    padding: 24px;
}

.details-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.details-modal-field {
    min-width: 0;
}

.details-modal-label {
    display: block;
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.details-modal-value {
    color: #111827;
    font-weight: 600;
    word-break: break-word;
}

.details-modal-value code {
    font-size: 0.9em;
}

.details-modal-message {
    margin-top: 4px;
}

.details-modal-message-box {
    margin-top: 8px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    color: #374151;
    line-height: 1.6;
}

.support-thread {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 320px;
    overflow-y: auto;
}

.support-thread-item {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #eef2f7;
    background: #f8fafc;
}

.support-thread-admin {
    background: #eef6ff;
    border-color: #d6e8ff;
}

.support-thread-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: #6b7280;
}

.support-thread-body {
    color: #1f2937;
    line-height: 1.55;
}

.support-reply-textarea {
    margin-top: 8px;
    border-radius: 10px;
}

/* Support request detail page */
.support-request-detail-page .support-title {
    letter-spacing: -0.01em;
}

.support-request-detail-page .sr-page-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 55%, #f1f7ff 100%);
    border: 1px solid #e6eef8;
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.support-request-detail-page .sr-page-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.support-request-detail-page .sr-detail-section-title {
    font-size: 1.02rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.support-request-detail-page .sr-detail-panel {
    border: 1px solid #e6eef8;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.support-request-detail-page .sr-detail-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid #eef2f7;
}

.support-request-detail-page .sr-detail-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.support-request-detail-page .sr-detail-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #475569;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 600;
}

.support-request-detail-page .sr-detail-grid .details-modal-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.support-request-detail-page .sr-detail-grid > [class*="col-"] {
    padding: 14px 14px;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    background: #fff;
}

.support-request-detail-page .sr-detail-grid .details-modal-value {
    margin-top: 6px;
}

.sr-conversation-panel .support-panel-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.support-request-detail-page .sr-conversation-panel {
    border: 1px solid #e6eef8;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.sr-conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.feedback-thread-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 18px;
}

.feedback-thread-item {
    padding: 16px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.feedback-thread-item.is-latest {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.feedback-thread-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.sr-chat-thread {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 360px;
    max-height: 560px;
    overflow-y: auto;
    padding: 22px;
    background:
        radial-gradient(1200px 480px at 20% 0%, rgba(20, 96, 172, 0.08), transparent 55%),
        radial-gradient(1000px 420px at 90% 20%, rgba(15, 118, 110, 0.08), transparent 55%),
        linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
}

.sr-chat-message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    max-width: 78%;
}

.sr-chat-customer {
    align-self: flex-start;
}

.sr-chat-admin {
    align-self: flex-end;
}

.sr-chat-bubble {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow:
        0 10px 25px rgba(15, 23, 42, 0.06),
        0 2px 8px rgba(15, 23, 42, 0.05);
    min-width: 0;
}

.sr-chat-admin .sr-chat-bubble {
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.sr-chat-bubble-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.82rem;
    color: #6b7280;
}

.sr-chat-bubble-header strong {
    color: #111827;
    font-size: 0.92rem;
}

.sr-chat-role {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.sr-chat-admin .sr-chat-role {
    background: #d1fae5;
    color: #047857;
}

.sr-delivery-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.sr-delivery-sent {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.sr-delivery-seen {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.sr-delivery-meta {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #64748b;
}

.sr-chat-bubble-header time {
    margin-left: auto;
    white-space: nowrap;
}

.sr-chat-bubble-body {
    color: #1f2937;
    line-height: 1.6;
    font-size: 0.95rem;
    word-break: break-word;
}

.sr-reply-composer {
    padding-top: 16px;
    border-top: 1px solid #eef2f7;
    background: #fbfdff;
    border-radius: 14px;
    padding: 16px;
    border: 1px solid #e6eef8;
}

.sr-reply-textarea {
    margin-top: 8px;
    border-radius: 12px;
    border-color: #d1d5db;
    min-height: 110px;
    resize: vertical;
}

.sr-reply-textarea:focus {
    border-color: #1460ac;
    box-shadow: 0 0 0 0.2rem rgba(20, 96, 172, 0.15);
}

@media (max-width: 991px) {
    .sr-chat-message {
        max-width: 100%;
    }

    .sr-chat-bubble-header time {
        margin-left: 0;
        width: 100%;
    }
}

.details-modal-content .modal-footer {
    border-top: 1px solid #eef2f7;
    padding: 16px 24px;
}

@media (max-width: 991px) {
    .details-modal-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================
   Responsive Design
   ================================ */

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }

    .sidebar-brand-text,
    .sidebar-nav .nav-link > span:not(.sidebar-nav-icon-wrap),
    .sidebar-bottom .nav-link span,
    .sidebar-footer {
        display: none;
    }

    .sidebar-brand,
    .sidebar-nav .nav-link,
    .sidebar-bottom .nav-link {
        justify-content: center;
        padding-left: 10px;
        padding-right: 10px;
    }

    .main-content {
        margin-left: 80px;
    }

    .container-fluid {
        padding: 15px !important;
    }

    .dashboard-list-item {
        grid-template-columns: auto 1fr;
    }

    .dashboard-list-meta {
        grid-column: 1 / -1;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .dashboard-title {
        font-size: 1.6rem;
    }

    .dashboard-date-range {
        width: 100%;
        justify-content: space-between;
    }

    .dashboard-date-range-btn {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 60px;
    }

    .main-content {
        margin-left: 60px;
    }

    .stat-card h3 {
        font-size: 1.5rem;
    }

    .stat-card p {
        font-size: 0.8rem;
    }

    .table thead {
        font-size: 0.8rem;
    }

    .table tbody td {
        padding: 10px;
        font-size: 0.85rem;
    }

    .navbar-brand {
        font-size: 1rem;
    }
}

/* ================================
   Animations
   ================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.3s ease;
}

.table tbody tr {
    animation: fadeIn 0.3s ease;
}

/* ================================
   Utility Classes
   ================================ */

.text-muted {
    color: #999 !important;
}

.border-top {
    border-top: 1px solid #e9ecef !important;
}

.shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.no-data i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* ================================
   Bootstrap Brand Overrides
   ================================ */

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-info {
    background-color: var(--info-color) !important;
    color: #fff !important;
}

.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

a {
    color: var(--primary-color);
}

a:hover {
    color: var(--primary-dark);
}

/* ================================
   Dashboard Page
   ================================ */

.dashboard-page {
    max-width: 1400px;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.35rem;
}

.dashboard-subtitle {
    color: #6b7280;
    font-size: 0.98rem;
}

.dashboard-date-range {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0;
    color: #374151;
    font-size: 0.92rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    position: relative;
}

.dashboard-date-range-form {
    margin: 0;
}

.dashboard-date-range-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    padding: 12px 16px;
    color: #374151;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
}

.dashboard-date-range-btn::after {
    display: none;
}

.dashboard-date-range-btn:hover,
.dashboard-date-range-btn:focus {
    color: var(--primary-color);
}

.dashboard-date-range-btn .bi-chevron-down {
    font-size: 0.8rem;
    color: #9ca3af;
}

.dashboard-date-range-menu {
    min-width: 220px;
    border: 1px solid #e8eef5;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 10px 30px rgba(15, 77, 143, 0.12);
    margin-top: 8px !important;
}

.dashboard-date-range-menu .dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 10px;
    padding: 10px 12px;
    color: #374151;
    font-weight: 500;
}

.dashboard-date-range-menu .dropdown-item:hover {
    background: #f0f6fc;
    color: var(--primary-color);
}

.dashboard-date-range-menu .dropdown-item.active {
    background: rgba(20, 96, 172, 0.1);
    color: var(--primary-dark);
    font-weight: 700;
}

.dashboard-date-range-menu .dropdown-item.active i {
    color: var(--primary-color);
}

.dashboard-stat-card {
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 16px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 100%;
    box-shadow: 0 2px 8px rgba(15, 77, 143, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 77, 143, 0.08);
}

a.dashboard-stat-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.dashboard-stat-card-link:hover,
a.dashboard-stat-card-link:focus,
a.dashboard-stat-card-link:active {
    text-decoration: none;
    color: inherit;
}

a.dashboard-stat-card-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.dashboard-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    flex-shrink: 0;
}

.bg-primary-soft { background: rgba(20, 96, 172, 0.12); color: var(--primary-color); }
.bg-success-soft { background: rgba(25, 135, 84, 0.12); color: var(--success-color); }
.bg-warning-soft { background: rgba(232, 163, 23, 0.15); color: #b7791f; }
.bg-info-soft { background: rgba(61, 143, 209, 0.14); color: var(--info-color); }

.dashboard-stat-label {
    display: block;
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.dashboard-stat-content h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.1;
}

.dashboard-stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    margin-top: 8px;
    font-weight: 600;
}

.trend-up { color: var(--success-color); }
.trend-down { color: var(--danger-color); }
.trend-neutral { color: #6b7280; }

.dashboard-panel {
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 77, 143, 0.05);
}

.dashboard-panel-header {
    padding: 18px 22px;
    border-bottom: 1px solid #eef2f7;
}

.dashboard-panel-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-panel-body {
    padding: 22px;
}

.dashboard-panel-footer {
    padding: 16px 22px;
    border-top: 1px solid #eef2f7;
}

.dashboard-rating-value {
    color: var(--primary-color);
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.dashboard-stars {
    font-size: 1.2rem;
}

.rating-bar-row {
    display: grid;
    grid-template-columns: 52px 1fr 42px;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.rating-bar-label {
    color: #6b7280;
    font-size: 0.88rem;
    white-space: nowrap;
}

.rating-bar-label i {
    color: #fbbf24;
    font-size: 0.75rem;
}

.rating-bar-track {
    height: 8px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #1460ac 0%, #1e7ecc 100%);
    border-radius: 999px;
}

.rating-bar-percent {
    color: #6b7280;
    font-size: 0.82rem;
    text-align: right;
}

.quick-stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #eef2f7;
}

.quick-stat-item strong {
    display: block;
    color: #111827;
    margin-bottom: 2px;
}

.quick-stat-item p {
    margin: 0;
    color: #6b7280;
    font-size: 0.86rem;
}

.quick-stat-badge {
    min-width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
}

.dashboard-connection-chart-wrap {
    position: relative;
    width: 100%;
    max-width: 280px;
    height: 240px;
    margin: 0 auto 20px;
}

.dashboard-connection-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dashboard-connection-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.dashboard-connection-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 10px;
}

.dashboard-connection-legend-label {
    color: #374151;
    flex: 1;
}

.dashboard-connection-legend-value {
    color: #111827;
    font-weight: 600;
}

.dashboard-panel-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
}

.dashboard-panel-link:hover {
    color: var(--primary-dark);
}

.dashboard-list-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid #eef2f7;
}

.dashboard-list-item:last-child {
    border-bottom: none;
}

.dashboard-list-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.dashboard-list-content strong {
    display: block;
    color: #111827;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.dashboard-list-content span {
    display: block;
    color: #6b7280;
    font-size: 0.84rem;
    word-break: break-word;
}

.dashboard-list-meta {
    text-align: right;
    min-width: 110px;
}

.dashboard-list-meta small {
    display: block;
    color: #9ca3af;
    margin-top: 6px;
    font-size: 0.78rem;
}

.bg-success-subtle {
    background: #dcfce7 !important;
}

.bg-warning-subtle {
    background: #fef3c7 !important;
}

.text-success {
    color: #15803d !important;
}

.text-warning {
    color: #b45309 !important;
}

.dashboard-help-footer {
    margin-top: 28px;
    padding: 18px 0 8px;
    color: #6b7280;
    font-size: 0.92rem;
}

.dashboard-help-footer a {
    font-weight: 600;
}

.dashboard-page .card:hover {
    transform: none;
}

/* ================================
   Plugins Page
   ================================ */

.plugins-page {
    max-width: 1400px;
}

.plugins-panel {
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 77, 143, 0.05);
}

.plugins-panel-header {
    background: var(--brand-gradient);
    color: #fff;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.plugins-panel-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.plugins-refresh-btn {
    background: #fff;
    color: #0f4d8f;
    border: 1px solid rgba(255, 255, 255, 0.85);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.plugins-refresh-btn:hover,
.plugins-refresh-btn:focus {
    background: #f0f6fc;
    color: #0a3a6b;
    border-color: #fff;
}

.plugins-total-badge {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.plugins-panel-body {
    padding: 22px;
}

.plugins-search-box {
    position: relative;
}

.plugins-search-box input {
    border-radius: 12px;
    padding: 12px 44px 12px 14px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.plugins-search-box i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.plugins-filter-form .form-select {
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
}

.plugins-search-btn {
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 600;
}

.plugins-table thead th {
    background: #f8fafc;
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    padding: 16px 20px;
    border-bottom: 1px solid #eef2f7;
    white-space: nowrap;
}

.plugins-table tbody td {
    padding: 18px 20px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
    color: #374151;
    font-size: 0.92rem;
}

.plugins-table tbody tr:hover {
    background: #fafcff;
}

.plugins-name-cell strong {
    color: #111827;
    font-size: 0.95rem;
    font-weight: 700;
}

.plugins-key-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 220px;
}

.plugins-key {
    background: #fdf2f8;
    color: #db2777;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.82rem;
    word-break: break-word;
}

.plugins-copy-btn {
    border: none;
    background: transparent;
    color: #9ca3af;
    padding: 0;
    line-height: 1;
    cursor: pointer;
}

.plugins-copy-btn:hover {
    color: var(--primary-color);
}

.plugins-site-link {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    max-width: 280px;
    word-break: break-word;
    font-weight: 500;
}

.plugins-site-link i {
    font-size: 0.8rem;
    margin-top: 3px;
    flex-shrink: 0;
}

.plugins-site-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.plugins-email-cell {
    color: #4b5563;
    max-width: 240px;
    word-break: break-word;
}

.plugins-version-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.plugins-version-pill {
    display: inline-flex;
    align-items: center;
    background: #0f4d8f;
    color: #fff;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
}

.plugins-date-cell span {
    display: block;
    color: #111827;
    font-weight: 600;
    font-size: 0.88rem;
}

.plugins-date-cell small {
    display: block;
    color: #9ca3af;
    margin-top: 4px;
    font-size: 0.8rem;
}

.plugins-view-btn {
    background: #fff;
    color: var(--primary-color);
    border: 1px solid #bfd7f3;
    border-radius: 10px;
    padding: 7px 14px;
    font-weight: 600;
    white-space: nowrap;
}

.plugins-view-btn:hover {
    background: #f0f6fc;
    color: var(--primary-dark);
    border-color: #9fc4ea;
}

.plugins-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 22px;
    border-top: 1px solid #eef2f7;
    color: #6b7280;
    font-size: 0.88rem;
}

.plugins-pagination {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.plugins-page-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
}

.plugins-page-btn:hover {
    background: #f8fafc;
    color: var(--primary-color);
    border-color: #bfd7f3;
}

.plugins-page-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.plugins-page-btn.disabled {
    opacity: 0.45;
    pointer-events: none;
}

/* Plugin detail page */
.plugin-detail-page {
    max-width: 1400px;
}

.plugin-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 12px;
}

.plugin-detail-back:hover {
    text-decoration: underline;
}

.plugin-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 10px;
}

.plugin-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.plugin-detail-badge {
    font-size: 0.92rem;
    color: #64748b;
}

.plugin-detail-tabs .nav-link {
    color: #64748b;
    font-weight: 600;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 18px;
}

.plugin-detail-tabs .nav-link.active {
    color: var(--primary-color);
    background: transparent;
    border-bottom-color: var(--primary-color);
}

.plugin-detail-tabs .nav-link:hover {
    color: var(--primary-color);
}

.send-message-panel {
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
}

@media (max-width: 992px) {
    .plugins-table {
        min-width: 720px;
    }
}

/* ================================
   Feedback Reviews UI
   ================================ */

.feedback-page {
    max-width: 1400px;
}

.feedback-title {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.25rem;
}

.feedback-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
}

.feedback-total-badge {
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.88rem;
}

.feedback-panel {
    min-height: 100%;
}

.feedback-average-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 26px 22px;
    text-align: center;
    height: 100%;
}

.feedback-average-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feedback-muted-label {
    color: #6b7280;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 6px;
}

.feedback-average-value {
    font-size: 3rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.05;
}

.feedback-average-suffix {
    font-size: 1.4rem;
    font-weight: 700;
    color: #6b7280;
}

.feedback-average-stars {
    margin-top: 10px;
    display: flex;
    gap: 4px;
    font-size: 1.15rem;
    justify-content: center;
}

.feedback-average-stars i {
    font-size: 1.1rem;
}

.feedback-average-based {
    margin-top: 10px;
    color: #6b7280;
    font-size: 0.9rem;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    padding: 10px 12px;
    border-radius: 12px;
    display: inline-block;
}

.feedback-distribution-header {
    padding: 18px 22px;
    border-bottom: 1px solid #eef2f7;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #111827;
}

.feedback-distribution-header i {
    color: var(--primary-color);
}

.feedback-distribution-body {
    padding: 18px 22px 22px;
}

.feedback-dist-row {
    display: grid;
    grid-template-columns: 67px 2fr 110px;
    gap: 14px;
    align-items: center;
    margin-bottom: 12px;
}

.feedback-dist-stars {
    color: #6b7280;
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
}

.feedback-dist-bar {
    height: 10px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
}

.feedback-dist-fill {
    height: 100%;
    background: linear-gradient(90deg, #1460ac 0%, #1e7ecc 100%);
    border-radius: 999px;
}

.feedback-dist-right {
    color: #6b7280;
    font-size: 0.86rem;
    text-align: right;
    white-space: nowrap;
}

.feedback-filters {
    border-radius: 16px;
}

.feedback-rating-select {
    border-radius: 12px;
    padding: 12px 14px;
}

.feedback-table-rating {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}

.feedback-table-rating i {
    font-size: 0.9rem;
}

.feedback-list-card {
    border-radius: 16px;
    overflow: hidden;
}

.feedback-list-header {
    padding: 16px 22px;
    background: #fff;
    border-bottom: 1px solid #eef2f7;
    font-weight: 800;
    color: #6b7280;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feedback-list-header-right {
    display: flex;
    align-items: center;
    gap: 48px;
}

.feedback-list-body {
    padding: 0;
}

.feedback-review-item {
    padding: 18px 22px;
    border-bottom: 1px solid #eef2f7;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.feedback-review-main {
    flex: 1;
    min-width: 0;
}

.feedback-review-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.feedback-review-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(20, 96, 172, 0.10);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.feedback-review-meta {
    flex: 1;
}

.feedback-review-plugin-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.feedback-verified-badge {
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.78rem;
    color: #1f2937;
}

.feedback-review-plugin {
    font-size: 1rem;
    color: #111827;
}

.feedback-review-stars {
    margin-top: 6px;
    display: flex;
    gap: 2px;
    color: #fbbf24;
}

.feedback-review-feedback-box {
    margin-top: 12px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    padding: 14px 16px;
    color: #374151;
    line-height: 1.6;
}

.feedback-review-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

.feedback-review-date {
    text-align: right;
    color: #9ca3af;
    font-size: 0.88rem;
    white-space: nowrap;
}

.feedback-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 22px;
}

.feedback-showing {
    color: #6b7280;
    font-size: 0.92rem;
}

.feedback-page-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.feedback-per-page-select {
    padding-left: 6px;
}

@media (max-width: 991px) {
    .feedback-dist-row {
        grid-template-columns: 90px 1fr;
    }

    .feedback-dist-right {
        grid-column: 1 / -1;
        text-align: left;
    }

    .feedback-review-item {
        flex-direction: column;
    }

    .feedback-review-side {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .feedback-review-date {
        text-align: left;
    }

    .feedback-list-header-right {
        gap: 24px;
    }
}

/* ================================
   Send Announcements UI
   ================================ */

.send-message-page {
    max-width: 1400px;
}

.send-message-title {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.25rem;
}

.send-message-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
}

.send-form .form-label {
    font-weight: 700;
    color: #374151;
}

.send-char-count {
    font-size: 0.85rem;
}

.send-tips-heading {
    font-size: 0.95rem;
    font-weight: 900;
    color: #111827;
}

.send-tips-list {
    margin: 0;
    padding-left: 18px;
    color: #4b5563;
}

.send-tips-list li {
    margin-bottom: 8px;
}

.send-tips-divider {
    margin: 16px 0;
}

.send-view-all-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
}

.send-view-all-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.send-recent-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.send-recent-item {
    border: 1px solid #eef2f7;
    border-radius: 14px;
    padding: 14px 14px;
    background: #fff;
}

.send-recent-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.send-recent-title {
    font-weight: 900;
    color: #111827;
    font-size: 0.92rem;
}

.send-recent-status {
    font-size: 0.76rem;
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.send-recent-view-btn {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.send-recent-sub {
    margin-top: 6px;
    color: #6b7280;
    font-size: 0.85rem;
}

.send-recent-date {
    margin-top: 6px;
    color: #9ca3af;
    font-size: 0.82rem;
}

.send-form-actions {
    margin-top: 16px;
}

/* ================================
   Support Requests UI
   ================================ */

.support-page {
    max-width: 1400px;
}

.support-title {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.25rem;
}

.support-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
}

.support-total-badge {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
}

.support-panel {
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 77, 143, 0.05);
}

.support-panel-body {
    padding: 22px;
}

.support-search-box {
    position: relative;
}

.support-search-box input {
    border-radius: 12px;
    padding: 12px 44px 12px 14px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.support-search-box i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.support-filter-form .form-select {
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
}

.support-search-btn {
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 600;
}

.support-table thead th {
    background: #f8fafc;
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 16px 20px;
    border-bottom: 1px solid #eef2f7;
    white-space: nowrap;
}

.support-table tbody td {
    padding: 18px 20px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
    color: #374151;
    font-size: 0.92rem;
}

.support-table tbody tr:hover {
    background: #fafcff;
}

.support-plugin-cell {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 220px;
}

.support-plugin-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #e8f1fb;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.support-plugin-meta {
    min-width: 0;
}

.support-plugin-name {
    display: block;
    color: #111827;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.support-plugin-key {
    color: #6b7280;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.support-plugin-key code {
    background: #fdf2f8;
    color: #db2777;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.78rem;
    word-break: break-all; /* keep long keys from overflowing the table/modal */
}

.support-active-badge {
    background: #dcfce7;
    color: #166534;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.74rem;
    font-weight: 700;
}

.support-inactive-badge {
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.74rem;
    font-weight: 700;
}

.plugin-status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.74rem;
    font-weight: 700;
}

.plugin-status-active {
    background: #dcfce7;
    color: #166534;
}

.plugin-status-deactivated {
    background: #fef3c7;
    color: #92400e;
}

.plugin-status-disconnected {
    background: #e0e7ff;
    color: #3730a3;
}

.plugin-status-deleted {
    background: #fee2e2;
    color: #991b1b;
}

.support-subject-cell {
    max-width: 360px;
}

.support-subject-text {
    color: #111827;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 8px;
    word-break: break-word;
}

.support-category-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    color: var(--primary-color);
    border: 1px solid #dbeafe;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.76rem;
    font-weight: 600;
}

.support-from-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 90px;
}

.support-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #e8f1fb;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
}

.support-user-name {
    color: #111827;
    font-weight: 600;
    font-size: 0.88rem;
    text-align: center;
}

.support-email-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    word-break: break-word;
    max-width: 240px;
    display: inline-block;
}

.support-email-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.support-date-cell span {
    display: block;
}

.support-date-cell > span:first-child {
    color: #111827;
    font-weight: 600;
    font-size: 0.88rem;
}

.support-time-ago,
.support-date-cell .support-time-ago {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin-top: 6px;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.74rem;
    font-weight: 600;
    white-space: nowrap;
    text-align: center;
    line-height: 1.3;
}

.support-view-btn {
    background: #fff;
    color: var(--primary-color);
    border: 1px solid #bfd7f3;
    border-radius: 10px;
    padding: 7px 14px;
    font-weight: 600;
    white-space: nowrap;
}

.support-view-btn:hover {
    background: #f0f6fc;
    color: var(--primary-dark);
    border-color: #9fc4ea;
}

.admin-action-btns {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-delete-btn {
    background: #fff;
    color: #b42318;
    border: 1px solid #f3c1bc;
    border-radius: 10px;
    padding: 7px 14px;
    font-weight: 600;
    white-space: nowrap;
}

.admin-delete-btn:hover {
    background: #fef3f2;
    color: #912018;
    border-color: #f0a8a0;
}

.support-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 22px;
    border-top: 1px solid #eef2f7;
    color: #6b7280;
    font-size: 0.88rem;
}

.support-footer-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.support-pagination {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.support-per-page-form {
    margin: 0;
}

.support-per-page-select {
    width: auto;
    min-width: 130px;
    border-radius: 10px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    font-size: 0.85rem;
    color: #4b5563;
}

@media (max-width: 992px) {
    .support-table {
        min-width: 820px;
    }
}

@media (max-width: 768px) {
    .support-footer-controls {
        width: 100%;
        justify-content: space-between;
    }
}


/* ================================
   Notifications UI
   ================================ */

.notifications-page {
    max-width: 1400px;
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
}

.notifications-title {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.25rem;
}

.notifications-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
}

.notifications-top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.notifications-count-pill {
    background: #e8f1fb;
    border: 1px solid #bfd7f3;
    color: var(--primary-dark);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.notifications-gradient-btn {
    background: var(--brand-gradient) !important;
    border: none !important;
    color: #fff !important;
    border-radius: 12px;
    font-weight: 600;
}

.notifications-gradient-btn:hover,
.notifications-gradient-btn:focus {
    background: var(--brand-gradient-hover) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(20, 96, 172, 0.35);
}

.notifications-gradient-btn:disabled {
    opacity: 0.55;
    box-shadow: none;
}

.notifications-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 14px;
    padding: 10px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(15, 77, 143, 0.04);
}

.notifications-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.notifications-filter-tab:hover {
    background: #f0f6fc;
    color: var(--primary-color);
}

.notifications-filter-tab.active {
    background: #e8f1fb;
    color: var(--primary-dark);
}

.notifications-filter-count {
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 700;
}

.notifications-filter-tab.active .notifications-filter-count {
    background: rgba(20, 96, 172, 0.12);
    color: var(--primary-dark);
}

.notifications-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    display: inline-block;
}

.notifications-empty-card {
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 16px;
    padding: 24px;
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.notification-card {
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(15, 77, 143, 0.04);
}

.notification-card.is-unread {
    border-color: #bfd7f3;
    background: #fafcff;
}

.notification-card-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.notification-card-left {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.notification-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(20, 96, 172, 0.1);
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.notification-icon.support {
    background: #e8f1fb;
    color: #1460ac;
}

.notification-icon.feedback {
    background: #e8f8ef;
    color: #198754;
}

.notification-title-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-title {
    color: #111827;
    font-size: 1rem;
    font-weight: 800;
}

.notification-unread-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    display: inline-block;
}

.notification-meta {
    color: #9ca3af;
    font-size: 0.84rem;
    margin-top: 4px;
}

.notification-card-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.notification-type-badge {
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.notification-type-badge.support {
    background: #e8f1fb;
    color: #1460ac;
}

.notification-type-badge.feedback {
    background: #e8f8ef;
    color: #198754;
}

.notification-status-badge {
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.notification-status-badge.unread {
    background: #f3f4f6;
    color: #6b7280;
}

.notification-status-badge.read {
    background: #f3f4f6;
    color: #6b7280;
}

.notification-menu-btn {
    width: 34px;
    height: 34px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.notification-menu-btn:hover {
    background: #f8fafc;
    color: var(--primary-color);
}

.notification-card-details {
    margin-top: 14px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification-detail-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px;
    align-items: start;
}

.notification-detail-label {
    color: #6b7280;
    font-size: 0.84rem;
    font-weight: 600;
}

.notification-detail-value {
    color: #111827;
    font-size: 0.9rem;
    font-weight: 600;
    word-break: break-word;
}

.notification-card-footer {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.notification-view-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.notification-view-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.notification-outline-btn {
    border-radius: 10px;
    font-weight: 600;
}

.notifications-pagination {
    margin-top: 18px;
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.notifications-per-page-form {
    margin: 0;
}

@media (max-width: 992px) {
    .notification-detail-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .notification-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ================================
   Profile UI
   ================================ */

.account-page {
    max-width: 1400px;
}

.account-title {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.25rem;
}

.account-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
}

.account-summary {
    padding-top: 28px;
    padding-bottom: 28px;
}

.account-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    margin: 0 auto 16px;
    background: rgba(20, 96, 172, 0.12);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
}

.account-summary-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 4px;
}

.account-summary-meta {
    color: #6b7280;
    font-size: 0.92rem;
    margin-bottom: 0;
}

.account-summary-stats {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.account-summary-label {
    display: block;
    color: #9ca3af;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.account-form .form-label {
    font-weight: 700;
    color: #374151;
}

.account-form .form-control,
.account-form .form-select {
    border-radius: 12px;
    padding: 11px 14px;
    border: 1px solid #e5e7eb;
}

.account-form-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

/* ---------------------------------------------------------------
   Uniform pill badge sizing — keeps all status/total pills the
   same height wherever they appear (heroes, tables, panels).
   --------------------------------------------------------------- */
.support-total-badge,
.feedback-total-badge,
.badge.feedback-total-badge,
.send-recent-status,
.badge.send-recent-status,
.support-active-badge,
.support-inactive-badge,
.badge.support-active-badge,
.badge.support-inactive-badge,
.plugin-status-badge,
.notification-type-badge,
.notification-status-badge,
.support-request-detail-page .sr-detail-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 7px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

/* ================================
   Public legal pages
   ================================ */

.legal-page-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    color: #1f2937;
    background: linear-gradient(180deg, #f4f8fc 0%, #eef4fa 220px, #f8fafc 220px);
}

.legal-page-header {
    background: #fff;
    border-bottom: 1px solid #e5edf5;
    box-shadow: 0 1px 0 rgba(20, 96, 172, 0.06);
}

.legal-page-header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
}

.legal-page-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #111827;
    font-weight: 700;
    font-size: 1.02rem;
    text-decoration: none;
}

.legal-page-brand:hover {
    color: #111827;
    text-decoration: none;
}

.legal-page-brand-logo {
    display: block;
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    object-position: left center;
    flex-shrink: 0;
}

.legal-page-brand-text {
    line-height: 1.2;
    white-space: nowrap;
}

@media (max-width: 576px) {
    .legal-page-header-inner {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    .legal-page-brand {
        justify-content: center;
        flex-wrap: wrap;
    }

    .legal-page-brand-logo {
        height: 32px;
        max-width: 150px;
        object-position: center;
    }

    .legal-page-brand-text {
        font-size: 0.92rem;
    }

    .legal-page-nav {
        justify-content: center;
        width: 100%;
    }
}

.legal-page-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.legal-page-nav a {
    color: #4b5563;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
}

.legal-page-nav a:hover,
.legal-page-nav a.active {
    color: #1460ac;
}

.legal-page-main {
    flex: 1;
    padding: 32px 0 48px;
}

.tw-legal-page {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e5edf5;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
    padding: 40px 44px;
}

.tw-legal-page h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
}

.tw-legal-page h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1460ac;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.tw-legal-page h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.tw-legal-page p,
.tw-legal-page li {
    line-height: 1.7;
    color: #374151;
}

.tw-legal-page ul {
    padding-left: 1.25rem;
}

.tw-legal-page table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.92rem;
}

.legal-table-wrap {
    width: 100%;
    margin: 1rem 0 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.legal-table-wrap table {
    margin: 0;
    min-width: 0;
}

.tw-legal-page th,
.tw-legal-page td {
    border: 1px solid #dbe4ee;
    padding: 10px 12px;
    vertical-align: top;
    text-align: left;
}

.tw-legal-page th {
    background: #f3f7fb;
    font-weight: 700;
    color: #0f172a;
}

.tw-legal-page blockquote {
    margin: 1rem 0;
    padding: 14px 16px;
    border-left: 4px solid #1460ac;
    background: #f3f8fd;
    border-radius: 0 10px 10px 0;
    color: #334155;
}

.tw-legal-page a {
    color: #1460ac;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tw-legal-page code {
    font-size: 0.88em;
    background: #f1f5f9;
    padding: 0.1em 0.35em;
    border-radius: 4px;
}

.legal-page-footer {
    background: #0b2f57;
    color: rgba(255, 255, 255, 0.82);
    padding: 24px 0;
    margin-top: auto;
}

.legal-page-footer-inner {
    text-align: center;
    font-size: 0.88rem;
}

.legal-page-footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.legal-page-footer a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.legal-page-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .legal-page-main {
        padding: 20px 0 32px;
    }

    .tw-legal-page {
        padding: 24px 20px;
        border-radius: 14px;
    }

    .tw-legal-page h1 {
        font-size: 1.6rem;
    }

    .legal-page-nav {
        gap: 12px;
        justify-content: center;
    }

    .legal-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid #dbe4ee;
        border-radius: 10px;
        background: #fff;
    }

    .legal-table-wrap table {
        min-width: 640px;
        margin: 0;
    }

    .legal-table-wrap th,
    .legal-table-wrap td {
        white-space: nowrap;
    }

    .legal-table-wrap th:first-child,
    .legal-table-wrap td:first-child,
    .legal-table-wrap th:last-child,
    .legal-table-wrap td:last-child {
        white-space: normal;
        min-width: 160px;
    }
}

/* ================================
   Public home / landing page
   ================================ */

.tw-home-body {
    background:
        radial-gradient(ellipse 80% 50% at 10% -10%, rgba(20, 96, 172, 0.16), transparent 55%),
        radial-gradient(ellipse 60% 40% at 90% 0%, rgba(30, 126, 204, 0.12), transparent 50%),
        linear-gradient(180deg, #eef5fb 0%, #f7fafc 42%, #f8fafc 100%);
}

.tw-home-main {
    padding: 0 0 64px;
}

.tw-home-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    min-height: 0;
    display: flex;
    align-items: center;
}

.tw-home-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.16), transparent 32%),
        radial-gradient(circle at 84% 68%, rgba(61, 143, 209, 0.35), transparent 42%),
        linear-gradient(135deg, #0b2f57 0%, #1460ac 48%, #0f4d8f 100%);
    transform: scale(1.02);
    animation: tw-home-hero-drift 18s ease-in-out infinite alternate;
}

.tw-home-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 55%, rgba(7, 28, 52, 0.28) 100%);
    pointer-events: none;
}

.tw-home-hero-inner {
    position: relative;
    z-index: 1;
    width: min(920px, calc(100% - 48px));
    margin: 0 auto;
    padding: 80px 0;
    text-align: center;
    animation: tw-home-fade-up 0.7s ease both;
}

.tw-home-brand-mark {
    margin: 0 0 14px;
    font-size: clamp(1.35rem, 3.2vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #fff;
}

.tw-home-title {
    margin: 0 0 16px;
    font-size: clamp(1.7rem, 4.4vw, 2.65rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.tw-home-lead {
    margin: 0 auto 28px;
    max-width: 640px;
    font-size: clamp(1rem, 2.1vw, 1.15rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
}

.tw-home-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.tw-home-hero .tw-home-cta-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: min(550px, 100%);
    margin-inline: auto;
}

.tw-home-hero .tw-home-cta-group .tw-home-btn {
    width: 100%;
}

.tw-home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.tw-home-btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.tw-home-btn-primary {
    background: #fff;
    color: #0f4d8f;
    box-shadow: 0 12px 28px rgba(5, 30, 70, 0.25);
}

.tw-home-btn-primary:hover {
    background: #f3f8fd;
    color: #0b3d73;
}

.tw-home-btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.tw-home-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.tw-home-btn-outline {
    background: transparent;
    color: #1460ac;
    border: 1px solid #b7d0e8;
}

.tw-home-btn-outline:hover {
    background: #f3f8fd;
    color: #0f4d8f;
    border-color: #1460ac;
}

.tw-home-section {
    width: min(1040px, calc(100% - 48px));
    margin: 56px auto 0;
}

.tw-home-section-alt {
    padding: 40px 36px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(20, 96, 172, 0.1);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.04);
}

.tw-home-section-intro {
    max-width: 640px;
    margin-bottom: 28px;
}

.tw-home-section-intro h2 {
    margin: 0 0 10px;
    font-size: clamp(1.45rem, 2.8vw, 1.85rem);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.tw-home-section-intro p {
    margin: 0;
    color: #4b5563;
    line-height: 1.7;
    font-size: 1.02rem;
}

.tw-home-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 36px;
}

.tw-home-feature {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 16px;
    align-items: start;
    opacity: 0;
    animation: tw-home-fade-up 0.65s ease both;
}

.tw-home-feature:nth-child(1) { animation-delay: 0.05s; }
.tw-home-feature:nth-child(2) { animation-delay: 0.12s; }
.tw-home-feature:nth-child(3) { animation-delay: 0.19s; }
.tw-home-feature:nth-child(4) { animation-delay: 0.26s; }

.tw-home-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(20, 96, 172, 0.1);
    color: #1460ac;
    font-size: 1.25rem;
}

.tw-home-feature-body h3 {
    margin: 2px 0 8px;
    font-size: 1.08rem;
    font-weight: 700;
    color: #0f172a;
}

.tw-home-feature-body p {
    margin: 0;
    color: #4b5563;
    line-height: 1.65;
}

.tw-home-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 22px;
}

.tw-home-step {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 16px;
    align-items: start;
}

.tw-home-step-num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #1460ac;
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 8px 18px rgba(20, 96, 172, 0.28);
}

.tw-home-step h3 {
    margin: 4px 0 6px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.tw-home-step p {
    margin: 0;
    color: #4b5563;
    line-height: 1.65;
}

.tw-home-privacy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.tw-home-privacy-item h3 {
    margin: 0 0 12px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1460ac;
}

.tw-home-privacy-item ul {
    margin: 0;
    padding-left: 1.15rem;
    color: #374151;
    line-height: 1.7;
}

.tw-home-privacy-item li + li {
    margin-top: 4px;
}

.tw-home-privacy-note {
    margin: 24px 0 0;
    color: #4b5563;
    line-height: 1.65;
}

.tw-home-privacy-note a {
    color: #1460ac;
    font-weight: 600;
    text-underline-offset: 2px;
}

.tw-home-section-cta {
    margin-top: 64px;
}

.tw-home-cta-panel {
    text-align: center;
    padding: 48px 28px;
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(20, 96, 172, 0.08), rgba(30, 126, 204, 0.04)),
        #fff;
    border: 1px solid rgba(20, 96, 172, 0.12);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
    animation: tw-home-fade-up 0.7s ease both;
}

.tw-home-cta-panel h2 {
    margin: 0 0 10px;
    font-size: clamp(1.3rem, 2.6vw, 1.7rem);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.tw-home-cta-panel > p {
    margin: 0 auto 24px;
    max-width: 600px;
    color: #4b5563;
    line-height: 1.65;
}

.tw-home-cta-panel > p a {
    color: #1460ac;
    font-weight: 600;
    text-decoration: underline;
}

.tw-home-cta-panel .tw-home-btn-primary {
    background: #1460ac;
    color: #fff;
    box-shadow: 0 10px 22px rgba(20, 96, 172, 0.28);
}

.tw-home-cta-panel .tw-home-btn-primary:hover {
    background: #0f4d8f;
    color: #fff;
}

@keyframes tw-home-fade-up {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes tw-home-hero-drift {
    from {
        transform: scale(1.02) translate3d(0, 0, 0);
    }
    to {
        transform: scale(1.06) translate3d(0, -1.2%, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tw-home-hero-bg,
    .tw-home-hero-inner,
    .tw-home-feature,
    .tw-home-cta-panel {
        animation: none !important;
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 768px) {
    .tw-home-hero {
        min-height: auto;
    }

    .tw-home-hero-inner {
        padding: 60px;
        width: min(920px, calc(100% - 32px));
    }

    .tw-home-section,
    .tw-home-section-alt {
        width: min(1040px, calc(100% - 32px));
    }

    .tw-home-section-alt {
        padding: 28px 20px;
    }

    .tw-home-features,
    .tw-home-privacy-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .tw-home-cta-group {
        flex-direction: column;
        align-items: stretch;
    }

    .tw-home-hero .tw-home-cta-group {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .tw-home-btn {
        width: 100%;
    }

    .tw-home-cta-panel {
        padding: 48px 60px;
    }
}

@media (max-width: 450px) {
    .tw-home-hero-inner {
        padding: 40px 0;
    }

    .tw-home-cta-panel {
        padding: 40px 20px;
    }

    .tw-home-cta-panel > p a {
        word-wrap: break-word;
    }
}

