/* ============================================================
   Mechatro Helpdesk – Main Stylesheet
   ============================================================ */

:root {
    --navy-900: #060d14;
    --navy-800: #0d1b2a;
    --navy-700: #112236;
    --navy-600: #152b44;
    --navy-500: #1e3a5f;
    --blue-600: #1d4ed8;
    --blue-500: #2563eb;
    --blue-400: #3b82f6;
    --blue-300: #60a5fa;
    --blue-100: #dbeafe;
    --blue-50:  #eff6ff;
    --cyan-400: #22d3ee;
    --cyan-100: #cffafe;
    --green-500: #22c55e;
    --green-100: #dcfce7;
    --orange-500: #f97316;
    --orange-100: #ffedd5;
    --red-500: #ef4444;
    --red-100: #fee2e2;
    --amber-500: #f59e0b;
    --amber-100: #fef3c7;
    --gray-500: #6b7280;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --sidebar-width: 260px;
    --nav-height: 64px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #f0f4f8;
    color: #1e293b;
    margin: 0;
    min-height: 100vh;
    font-size: 15px;
    line-height: 1.6;
}

a { color: var(--blue-500); text-decoration: none; }
a:hover { color: var(--blue-400); }

/* ── Customer Navbar ── */
.hd-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--navy-800);
    border-bottom: 1px solid rgba(37,99,235,0.2);
    z-index: 1000;
    box-shadow: 0 1px 20px rgba(0,0,0,0.4);
}

.hd-nav-inner {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 24px;
    max-width: 1400px;
    margin: 0 auto;
    gap: 8px;
}

.hd-nav-brand { text-decoration: none; }

.hd-nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hd-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--blue-500), var(--blue-400));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
}

.hd-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.hd-logo-name {
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 2px;
    color: #fff;
}

.hd-logo-sub {
    font-size: 11px;
    color: var(--blue-300);
    letter-spacing: 0.5px;
}

.hd-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 32px;
}

.hd-nav-link {
    color: rgba(255,255,255,0.7);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.hd-nav-link:hover,
.hd-nav-link.active {
    color: #fff;
    background: rgba(37,99,235,0.2);
}

.hd-nav-link.active {
    color: var(--blue-300);
}

.hd-nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hd-nav-username {
    color: rgba(255,255,255,0.75);
    font-size: 14px;
}

.hd-btn-logout {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.hd-btn-logout:hover {
    background: rgba(239,68,68,0.2);
    border-color: rgba(239,68,68,0.4);
    color: #fca5a5;
}

/* ── Customer Content Area ── */
.hd-content {
    margin-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height) - 56px);
    padding: 32px 24px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    margin-top: calc(var(--nav-height) + 0px);
}

.hd-footer {
    background: var(--navy-800);
    color: rgba(255,255,255,0.4);
    text-align: center;
    padding: 16px;
    font-size: 13px;
    border-top: 1px solid rgba(37,99,235,0.15);
}

/* ── Admin Layout ── */
.hd-admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.hd-sidebar {
    width: var(--sidebar-width);
    background: var(--navy-800);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(37,99,235,0.15);
    z-index: 900;
    transition: transform 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.hd-sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.hd-sidebar-nav {
    flex: 1;
    padding: 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hd-sidebar-section {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    padding: 8px 8px 4px;
    margin-top: 8px;
}

.hd-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: rgba(255,255,255,0.65);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.hd-sidebar-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.hd-sidebar-item:hover {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.9);
}

.hd-sidebar-item.active {
    background: rgba(37,99,235,0.25);
    color: var(--blue-300);
    font-weight: 600;
}

.hd-sidebar-item.active i {
    color: var(--blue-400);
}

.hd-sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.hd-sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.hd-sidebar-avatar {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.hd-sidebar-user-info { min-width: 0; }

.hd-sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hd-sidebar-user-role {
    font-size: 11px;
    color: var(--blue-300);
}

.hd-sidebar-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: 7px;
    color: #fca5a5;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.hd-sidebar-logout:hover {
    background: rgba(239,68,68,0.2);
    border-color: rgba(239,68,68,0.4);
    color: #fca5a5;
}

/* ── Admin Main Content ── */
.hd-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hd-topbar {
    height: 60px;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.hd-topbar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy-800);
    flex: 1;
}

.hd-main-content {
    flex: 1;
    padding: 28px;
}

/* ── Hamburger ── */
.hd-hamburger {
    display: none;
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}

.hd-hamburger:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.hd-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 850;
}

/* ── Card ── */
.hd-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.03);
    overflow: hidden;
}

.hd-card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hd-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy-800);
    margin: 0;
}

.hd-card-body {
    padding: 22px;
}

/* ── Stat Cards ── */
.hd-stat-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.hd-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.hd-stat-icon.blue   { background: var(--blue-50);   color: var(--blue-500); }
.hd-stat-icon.cyan   { background: var(--cyan-100);  color: #0891b2; }
.hd-stat-icon.orange { background: var(--orange-100); color: var(--orange-500); }
.hd-stat-icon.green  { background: var(--green-100); color: #16a34a; }
.hd-stat-icon.red    { background: var(--red-100);   color: var(--red-500); }

.hd-stat-info {}
.hd-stat-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--navy-800);
    line-height: 1;
}
.hd-stat-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 3px;
}

/* ── Badges ── */
.hd-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.hd-badge-new          { background: #dbeafe; color: #1d4ed8; }
.hd-badge-accepted     { background: #cffafe; color: #0e7490; }
.hd-badge-in_progress  { background: #ffedd5; color: #c2410c; }
.hd-badge-resolved     { background: #dcfce7; color: #15803d; }
.hd-badge-closed       { background: #f1f5f9; color: #64748b; }

/* Priority – signal bars */
.hd-prio {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.hd-prio-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
}

.hd-prio-bar {
    width: 4px;
    border-radius: 2px;
    background: #cbd5e1;
}

.hd-prio-bar:nth-child(1) { height: 5px; }
.hd-prio-bar:nth-child(2) { height: 9px; }
.hd-prio-bar:nth-child(3) { height: 14px; }

.hd-prio-low    .hd-prio-bar.on { background: #94a3b8; }
.hd-prio-medium .hd-prio-bar.on { background: #f59e0b; }
.hd-prio-high   .hd-prio-bar.on { background: #ef4444; }

.hd-prio-label {
    font-size: 12px;
    font-weight: 600;
}

.hd-prio-low    .hd-prio-label { color: #64748b; }
.hd-prio-medium .hd-prio-label { color: #d97706; }
.hd-prio-high   .hd-prio-label { color: #dc2626; }

/* ── Table ── */
.hd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.hd-table thead th {
    background: #f8fafc;
    padding: 11px 14px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

.hd-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--gray-200);
    color: #334155;
    vertical-align: middle;
}

.hd-table tbody tr:last-child td { border-bottom: none; }

.hd-table tbody tr:hover td { background: #f8fafc; }

.hd-table-link {
    font-weight: 600;
    color: var(--navy-800);
    text-decoration: none;
}

.hd-table-link:hover { color: var(--blue-500); }

.hd-table-id {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 600;
}

/* ── Ticket Messages ── */
.hd-messages {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 8px 0;
}

.hd-msg {
    display: flex;
    flex-direction: column;
    max-width: 78%;
}

.hd-msg-customer {
    align-self: flex-end;
    align-items: flex-end;
}

.hd-msg-admin {
    align-self: flex-start;
    align-items: flex-start;
}

.hd-msg-internal {
    align-self: flex-start;
    align-items: flex-start;
    max-width: 85%;
}

.hd-msg-meta {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hd-msg-author { font-weight: 600; color: #475569; }

.hd-msg-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
}

.hd-msg-customer .hd-msg-bubble {
    background: var(--blue-500);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.hd-msg-admin .hd-msg-bubble {
    background: #f1f5f9;
    color: #1e293b;
    border: 1px solid var(--gray-200);
    border-bottom-left-radius: 4px;
}

.hd-msg-internal .hd-msg-bubble {
    background: var(--amber-100);
    color: #78350f;
    border: 1px dashed #fbbf24;
    border-bottom-left-radius: 4px;
}

.hd-msg-internal-label {
    font-size: 11px;
    background: var(--amber-500);
    color: #fff;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* ── Activity Log ── */
.hd-activity {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hd-activity-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 13px;
    color: #475569;
    position: relative;
}

.hd-activity-item:last-child { border-bottom: none; }

.hd-activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue-400);
    margin-top: 5px;
    flex-shrink: 0;
}

.hd-activity-time {
    font-size: 11px;
    color: var(--gray-500);
    white-space: nowrap;
}

.hd-activity-text { flex: 1; }

/* ── Forms ── */
.hd-form-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
    display: block;
}

.hd-form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.hd-form-control:focus {
    border-color: var(--blue-400);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.hd-form-control::placeholder { color: #94a3b8; }

textarea.hd-form-control { resize: vertical; min-height: 100px; }

select.hd-form-control { cursor: pointer; }

/* ── Buttons ── */
.hd-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}

.hd-btn-primary {
    background: var(--blue-500);
    color: #fff;
}

.hd-btn-primary:hover {
    background: var(--blue-600);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.hd-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid var(--gray-200);
}

.hd-btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.hd-btn-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.hd-btn-danger:hover {
    background: var(--red-500);
    color: #fff;
    border-color: var(--red-500);
}

.hd-btn-sm {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 6px;
}

/* ── Page Header ── */
.hd-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.hd-page-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--navy-800);
    margin: 0;
}

.hd-page-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    margin: 4px 0 0;
}

/* ── Ticket Header ── */
.hd-ticket-header {
    padding: 20px 22px;
    border-bottom: 1px solid var(--gray-200);
}

.hd-ticket-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--navy-800);
    margin: 0 0 10px;
}

.hd-ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hd-ticket-id {
    font-size: 12px;
    background: var(--gray-100);
    color: var(--gray-500);
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 700;
}

/* ── Description block ── */
.hd-description {
    background: #f8fafc;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 16px;
    font-size: 14px;
    color: #334155;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ── Empty State ── */
.hd-empty {
    text-align: center;
    padding: 48px 24px;
    color: #94a3b8;
}

.hd-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.hd-empty-text {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #64748b;
}

.hd-empty-sub {
    font-size: 13px;
    color: #94a3b8;
}

/* ── Alert / Flash Messages ── */
.hd-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hd-alert-error {
    background: var(--red-100);
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.hd-alert-success {
    background: var(--green-100);
    color: #15803d;
    border: 1px solid #86efac;
}

.hd-alert-info {
    background: var(--blue-50);
    color: var(--blue-600);
    border: 1px solid var(--blue-100);
}

/* ── Filter Bar ── */
.hd-filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.hd-filter-bar select,
.hd-filter-bar input {
    padding: 8px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: 7px;
    font-size: 13px;
    font-family: inherit;
    color: #374151;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.hd-filter-bar select:focus,
.hd-filter-bar input:focus {
    border-color: var(--blue-400);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* ── Pagination ── */
.hd-pagination {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.hd-page-btn {
    padding: 6px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    background: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.hd-page-btn:hover,
.hd-page-btn.active {
    background: var(--blue-500);
    border-color: var(--blue-500);
    color: #fff;
}

.hd-page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Login Page ── */
.hd-login-page {
    min-height: 100vh;
    background: var(--navy-800);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hd-login-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(37,99,235,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37,99,235,0.06) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.hd-login-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, transparent 70%);
    border-radius: 50%;
    top: -100px;
    left: -100px;
    pointer-events: none;
}

.hd-login-card {
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(37,99,235,0.2);
    border-radius: 20px;
    padding: 44px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.hd-login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.hd-login-logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--blue-500), var(--blue-400));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 22px;
    color: #fff;
}

.hd-login-logo-text .hd-logo-name {
    font-size: 16px;
    letter-spacing: 2px;
}

.hd-login-logo-text .hd-logo-sub {
    font-size: 12px;
}

.hd-login-heading {
    text-align: center;
    margin-bottom: 28px;
}

.hd-login-heading h1 {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
}

.hd-login-heading p {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    margin: 0;
}

.hd-login-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    margin-bottom: 6px;
}

.hd-login-input {
    width: 100%;
    padding: 11px 14px;
    background: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 9px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}

.hd-login-input:focus {
    border-color: var(--blue-400);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

.hd-login-input::placeholder { color: rgba(255,255,255,0.25); }

.hd-login-btn {
    width: 100%;
    padding: 12px;
    background: var(--blue-500);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.hd-login-btn:hover {
    background: var(--blue-600);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37,99,235,0.35);
}

.hd-login-error {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Setup Page ── */
.hd-setup-page {
    min-height: 100vh;
    background: var(--navy-800);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 40px 20px;
}

.hd-setup-card {
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(37,99,235,0.2);
    border-radius: 20px;
    padding: 44px 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

/* ── Breadcrumb ── */
.hd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 20px;
}

.hd-breadcrumb a {
    color: var(--blue-500);
    text-decoration: none;
}

.hd-breadcrumb a:hover { text-decoration: underline; }

.hd-breadcrumb-sep { color: var(--gray-200); }

/* ── Info Row ── */
.hd-info-row {
    display: flex;
    gap: 6px;
    font-size: 13px;
    color: #475569;
    padding: 6px 0;
    border-bottom: 1px solid var(--gray-100);
}

.hd-info-row:last-child { border-bottom: none; }

.hd-info-label {
    font-weight: 600;
    color: #374151;
    min-width: 100px;
    flex-shrink: 0;
}

/* ── Customer sidebar info ── */
.hd-info-card {
    background: #f8fafc;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 16px;
}

/* ── Checkbox ── */
.hd-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

.hd-checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--blue-500);
    cursor: pointer;
}

/* ── Active badge ── */
.hd-active-yes {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: var(--green-100);
    color: #15803d;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.hd-active-no {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: var(--gray-100);
    color: var(--gray-500);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* ── Divider ── */
.hd-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 20px 0;
}

/* ── Mobile Responsive ── */
@media (max-width: 768px) {
    .hd-sidebar {
        transform: translateX(calc(-1 * var(--sidebar-width)));
    }

    .hd-sidebar.open {
        transform: translateX(0);
    }

    .hd-sidebar-overlay.open {
        display: block;
    }

    .hd-main {
        margin-left: 0;
    }

    .hd-hamburger {
        display: inline-flex;
        align-items: center;
    }

    .hd-main-content {
        padding: 16px;
    }

    .hd-topbar {
        padding: 0 16px;
    }

    .hd-content {
        padding: 20px 16px;
    }

    .hd-msg,
    .hd-msg-internal {
        max-width: 90%;
    }

    .hd-login-card,
    .hd-setup-card {
        padding: 32px 24px;
    }

    .hd-stat-card {
        padding: 16px;
    }

    .hd-stat-number {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .hd-page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .hd-page-title { font-size: 20px; }

    .hd-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .hd-filter-bar select,
    .hd-filter-bar input { width: 100%; }
}

/* ── Ticket Summary Block ── */
.hd-summary-block {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: 12px;
    overflow: hidden;
}

.hd-summary-header {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #dcfce7;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    color: #15803d;
    border-bottom: 1px solid #86efac;
}

.hd-summary-badge {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    color: #16a34a;
    background: rgba(22,163,74,.12);
    border: 1px solid #86efac;
    border-radius: 20px;
    padding: 2px 8px;
    letter-spacing: .03em;
}

.hd-summary-body {
    padding: 14px 18px;
    font-size: 14px;
    color: #166534;
    line-height: 1.7;
}

/* ── Work Log / Cost Card ── */
.hd-cost-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 13px;
    gap: 8px;
}

.hd-cost-row:last-of-type { border-bottom: none; }

.hd-cost-label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #374151;
    font-weight: 500;
    flex: 1;
}

.hd-cost-rate {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 400;
    margin-left: 2px;
}

.hd-cost-value {
    font-size: 13px;
    color: #475569;
    text-align: right;
    white-space: nowrap;
}

.hd-cost-value strong { color: var(--navy-800); }

.hd-cost-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--navy-800);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
}

.hd-cost-total strong {
    font-size: 16px;
    color: var(--blue-300);
}

.hd-cost-hours-sum {
    text-align: right;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 6px;
}

.hd-admin-only-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 20px;
    padding: 2px 8px;
}

/* ── Colored dots (rate types) ── */
.hd-cost-dot,
.hd-hours-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-basic    { background: #2563eb; }
.dot-overtime { background: #f97316; }
.dot-weekend  { background: #8b5cf6; }

/* ── Close Ticket Modal ── */
.hd-modal-content {
    background: #fff;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.hd-modal-header {
    background: var(--navy-800);
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 18px 24px;
}

.hd-modal-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.hd-modal-body { padding: 24px; }

.hd-modal-footer {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.hd-modal-hint {
    font-size: 12px;
    color: #16a34a;
    margin-top: 6px;
    display: flex;
    align-items: center;
}

.hd-modal-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-200);
}

/* ── Hours Grid (modal + rates form) ── */
.hd-hours-grid,
.hd-rates-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hd-hours-item,
.hd-rate-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    padding: 12px 14px;
    transition: border-color .2s;
}

.hd-hours-item:focus-within,
.hd-rate-item:focus-within {
    border-color: var(--blue-400);
    background: #fff;
}

.hd-hours-info { flex: 1; }

.hd-hours-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy-800);
    line-height: 1.2;
}

.hd-hours-desc {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

.hd-hours-rate {
    font-size: 12px;
    color: var(--blue-500);
    font-weight: 600;
    margin-top: 2px;
}

.hd-hours-input,
.hd-rate-input {
    width: 90px;
    text-align: right;
    flex-shrink: 0;
}

/* ── Rate input with unit ── */
.hd-rate-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.hd-rate-unit {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
}

/* ── Danger button ── */
.hd-btn-danger {
    background: #dc2626;
    color: #fff;
    border: none;
}

.hd-btn-danger:hover {
    background: #b91c1c;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220,38,38,.3);
}

/* ── Finance Page ── */
.hd-finance-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.hd-finance-month-label {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy-800);
    padding: 0 8px;
    min-width: 180px;
    text-align: center;
}

.hd-finance-jump {
    display: flex;
    gap: 6px;
    align-items: center;
}

.hd-stat-blue  { background: linear-gradient(135deg, #eff6ff, #dbeafe); border-color: #bfdbfe; }
.hd-stat-green { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border-color: #86efac; }
.hd-stat-navy  { background: linear-gradient(135deg, var(--navy-800), var(--navy-600)); border-color: transparent; }

.hd-stat-blue  .hd-stat-icon,
.hd-stat-blue  .hd-stat-label  { color: #1d4ed8; }
.hd-stat-blue  .hd-stat-number { color: var(--navy-800); }
.hd-stat-blue  .hd-stat-sub    { color: #3b82f6; }

.hd-stat-green .hd-stat-icon,
.hd-stat-green .hd-stat-label  { color: #15803d; }
.hd-stat-green .hd-stat-number { color: #14532d; }
.hd-stat-green .hd-stat-sub    { color: #16a34a; }

.hd-stat-navy  .hd-stat-icon,
.hd-stat-navy  .hd-stat-label  { color: rgba(255,255,255,.6); }
.hd-stat-navy  .hd-stat-number { color: #fff; }
.hd-stat-navy  .hd-stat-sub    { color: var(--blue-300); }

/* Finance customer card */
.hd-finance-customer-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.hd-finance-customer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #f8fafc;
    border-bottom: 1px solid var(--gray-200);
    gap: 12px;
    flex-wrap: wrap;
}

.hd-finance-customer-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hd-finance-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--navy-800);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hd-finance-customer-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy-800);
    line-height: 1.2;
}

.hd-finance-customer-company {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 1px;
}

.hd-finance-sla {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.hd-sla-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    color: #374151;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    padding: 3px 10px;
}

.hd-finance-total-badge {
    font-size: 18px;
    font-weight: 800;
    color: var(--navy-800);
    white-space: nowrap;
}

.hd-finance-body { overflow-x: auto; }

.hd-finance-table {
    width: 100%;
    border-collapse: collapse;
}

.hd-finance-table td {
    padding: 10px 20px;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.hd-finance-table tr:last-child td { border-bottom: none; }

.hd-finance-flat-row td { background: #fafbff; }

.hd-finance-section-header td {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--gray-500);
    background: #f8fafc;
    padding: 7px 20px;
    border-top: 1px solid var(--gray-200);
}

.hd-finance-ticket-row td { background: #fff; }

.hd-finance-ticket-row:hover td { background: #f8faff; }

.hd-finance-subtotal-row td {
    background: var(--navy-800);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 20px;
}

.hd-finance-item-name { min-width: 200px; color: #1e293b; }

.hd-finance-item-name a { color: var(--navy-800); font-weight: 500; }
.hd-finance-item-name a:hover { color: var(--blue-500); }

.hd-finance-closed-at {
    display: block;
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 2px;
}

.hd-finance-item-hours {
    min-width: 160px;
    color: var(--gray-500);
}

.hd-finance-item-amount {
    text-align: right;
    font-weight: 600;
    color: var(--navy-800);
    white-space: nowrap;
}

.hd-hours-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
    margin-right: 3px;
}

.hd-hours-pill.dot-basic    { background: #dbeafe; color: #1d4ed8; }
.hd-hours-pill.dot-overtime { background: #ffedd5; color: #c2410c; }
.hd-hours-pill.dot-weekend  { background: #ede9fe; color: #6d28d9; }

.hd-warranty-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #15803d;
    background: #dcfce7;
    border: 1px solid #86efac;
    border-radius: 20px;
    padding: 1px 8px;
}

.hd-finance-grand-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--navy-800);
    border-radius: 14px;
    padding: 20px 28px;
    margin-top: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.hd-finance-grand-amount {
    font-size: 28px;
    font-weight: 800;
    color: var(--blue-300);
}

@media (max-width: 600px) {
    .hd-finance-nav { flex-wrap: wrap; }
    .hd-finance-month-label { min-width: auto; }
    .hd-finance-grand-total { flex-direction: column; gap: 8px; text-align: center; }
    .hd-finance-grand-amount { font-size: 22px; }
}

/* ── Customer Overview Cards ── */
.hd-customer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 16px;
}

.hd-customer-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, border-color .2s;
    display: flex;
    flex-direction: column;
}

.hd-customer-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--blue-300);
}

.hd-customer-card-inactive {
    opacity: .7;
    border-style: dashed;
}

.hd-cc-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--gray-100);
}

.hd-cc-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hd-cc-identity { flex: 1; min-width: 0; }

.hd-cc-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hd-cc-company {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

.hd-cc-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.hd-cc-email {
    font-size: 12px;
    color: var(--blue-500);
}

.hd-cc-edit-btn { flex-shrink: 0; }

/* Metrics strip */
.hd-cc-metrics {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    border-bottom: 1px solid var(--gray-100);
    margin-top: auto;
}

.hd-cc-metric {
    padding: 12px 14px;
    border-right: 1px solid var(--gray-100);
}

.hd-cc-metric:last-child { border-right: none; }

.hd-cc-metric-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gray-500);
    margin-bottom: 5px;
}

.hd-cc-metric-value {
    font-size: 17px;
    font-weight: 800;
    color: var(--navy-800);
    line-height: 1.2;
}

.hd-cc-metric-unit {
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-500);
}

.hd-cc-metric-flat .hd-cc-metric-label { color: var(--blue-500); }
.hd-cc-metric-flat .hd-cc-metric-value { color: var(--blue-600); }

.hd-cc-warranty {
    font-size: 14px !important;
    color: #15803d !important;
    display: flex;
    align-items: center;
}

.hd-cc-sla-value {
    font-size: 14px;
    font-weight: 700;
}

.hd-cc-unset { color: var(--gray-500); font-weight: 400; font-size: 14px; }

/* Footer */
.hd-cc-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: #fafbfc;
}

.hd-cc-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
    text-decoration: none;
}

a.hd-cc-stat:hover { color: var(--blue-500); }

.hd-cc-open-badge {
    font-size: 10px;
    font-weight: 700;
    background: var(--orange-100);
    color: var(--orange-500);
    border-radius: 20px;
    padding: 1px 6px;
}

.hd-cc-rates-preview {
    display: flex;
    gap: 5px;
    align-items: center;
}

.hd-cc-rate-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    cursor: default;
}

/* ── Contact Rows (user_form) ── */
.hd-contact-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.hd-contact-row:last-of-type { border-bottom: none; }

.hd-contact-primary-wrap {
    padding-top: 10px;
    flex-shrink: 0;
}

.hd-contact-primary-wrap input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--blue-500);
    cursor: pointer;
}

.hd-contact-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    flex: 1;
}

.hd-contact-remove-btn {
    background: none;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    color: var(--gray-500);
    cursor: pointer;
    padding: 6px 9px;
    font-size: 14px;
    transition: all .2s;
    flex-shrink: 0;
    margin-top: 4px;
}

.hd-contact-remove-btn:hover {
    background: var(--red-100);
    border-color: #fca5a5;
    color: #dc2626;
}

@media (max-width: 768px) {
    .hd-customer-grid { grid-template-columns: 1fr; }
    .hd-cc-metrics    { grid-template-columns: 1fr 1fr; }
    .hd-cc-metric:nth-child(2) { border-right: none; }
    .hd-cc-metric:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid var(--gray-100); border-right: none; }
    .hd-contact-fields { grid-template-columns: 1fr; }
}

/* ── Partner / Reseller badge ── */
.hd-reseller-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    color: #7c3aed;
    background: #ede9fe;
    border: 1px solid #c4b5fd;
    border-radius: 20px;
    padding: 2px 9px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s, color .2s;
}

a.hd-reseller-badge:hover {
    background: #ddd6fe;
    color: #5b21b6;
}

/* ── Reseller grid & cards ── */
.hd-reseller-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
}

.hd-reseller-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, border-color .2s;
}

.hd-reseller-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #c4b5fd;
}

.hd-reseller-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #5b21b6, #7c3aed);
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── Reseller portal navbar accent ── */
.hd-nav-reseller {
    border-bottom-color: #7c3aed;
}

.hd-nav-reseller .hd-logo-icon {
    background: linear-gradient(135deg, #5b21b6, #7c3aed);
}

.hd-nav-reseller .hd-nav-link.active,
.hd-nav-reseller .hd-nav-link:hover {
    color: #7c3aed;
    border-bottom-color: #7c3aed;
}

/* ── Orange stat card ── */
.hd-stat-orange {
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border-color: #fed7aa;
}

.hd-stat-orange .hd-stat-icon,
.hd-stat-orange .hd-stat-label  { color: #c2410c; }
.hd-stat-orange .hd-stat-number { color: #7c2d12; }
.hd-stat-orange .hd-stat-sub    { color: #ea580c; }

/* ── Filter buttons (simple tab-style) ── */
.hd-filter-btn {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-500);
    background: #f1f5f9;
    border: 1.5px solid transparent;
    border-radius: 8px;
    padding: 5px 13px;
    text-decoration: none;
    transition: all .15s;
    white-space: nowrap;
}

.hd-filter-btn:hover {
    background: #e2e8f0;
    color: var(--navy-800);
}

.hd-filter-btn.active {
    background: #fff;
    border-color: var(--blue-400);
    color: var(--blue-600);
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(59,130,246,.15);
}

@media (max-width: 768px) {
    .hd-reseller-grid { grid-template-columns: 1fr; }
}
