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

:root {
    --white: #ffffff;
    --bg: #f5f6f8;
    --text: #1a1a1a;
    --text-light: #555;
    --text-muted: #999;
    --border: #e0e0e0;
    --link: #1a6cdb;
    --link-hover: #124da0;
    --green: #1b8a3e;
    --godaddy: #00838a;
    --hostinger: #5a30c4;
    --webtors: #d4600a;
    --radius: 8px;
    --shadow: 0 1px 4px rgba(0,0,0,0.06);
}

html { scroll-behavior: smooth; scroll-padding-top: 120px; }

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
strong { font-weight: 600; }
.hidden { display: none !important; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
}
.header-top {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 0.5rem;
}
.header h1 {
    font-size: 1.35rem; font-weight: 700; color: var(--text);
}
.header h1 i { color: var(--link); margin-right: 0.3rem; }
.header-info {
    display: flex; gap: 1rem; font-size: 0.8rem; color: var(--text-light);
}
.header-info i { margin-right: 0.2rem; }
.header-desc {
    font-size: 0.85rem; color: var(--text-light); margin-top: 0.35rem;
}

/* Nav */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.nav-inner {
    display: flex; gap: 0.25rem; padding: 0.5rem 0;
    overflow-x: auto; scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav-link {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.4rem 0.85rem; font-size: 0.8125rem; font-weight: 500;
    color: var(--text-light); border-radius: 6px; white-space: nowrap;
    transition: all 150ms ease; text-decoration: none;
}
.nav-link:hover { color: var(--text); background: var(--bg); text-decoration: none; }
.nav-link.active { color: var(--link); background: rgba(26,108,219,0.07); font-weight: 600; }
.nav-link i { font-size: 0.75rem; }

/* Main */
.main { padding: 1.5rem 0 3rem; }

/* Search */
.search-box {
    position: relative; margin-bottom: 0.5rem;
}
.search-icon {
    position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 0.85rem; pointer-events: none;
}
.search-box input {
    width: 100%; padding: 0.7rem 2.5rem 0.7rem 2.5rem;
    font-family: 'Outfit', sans-serif; font-size: 0.9rem;
    color: var(--text); background: var(--white);
    border: 1px solid var(--border); border-radius: var(--radius);
    outline: none; transition: border-color 150ms;
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box input:focus { border-color: var(--link); box-shadow: 0 0 0 2px rgba(26,108,219,0.1); }
.clear-btn {
    position: absolute; right: 0.6rem; top: 50%; transform: translateY(-50%);
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    border: none; background: none; color: var(--text-muted); cursor: pointer;
    border-radius: 4px; font-size: 0.8rem;
}
.clear-btn:hover { background: var(--bg); color: var(--text); }

.search-info {
    font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1.25rem; padding-left: 0.1rem;
}
.search-info span { color: var(--link); font-weight: 600; }

/* Sections */
.section { margin-bottom: 2.5rem; }
.section h2 {
    font-size: 1.2rem; font-weight: 700; color: var(--text);
    margin-bottom: 1rem; padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}
.section h2 i { color: var(--link); margin-right: 0.35rem; font-size: 1rem; }

/* Sub grid */
.sub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.sub-section h3 {
    font-size: 0.95rem; font-weight: 600; color: var(--text);
    margin-bottom: 0.75rem;
}
.sub-section h3 i { color: var(--link); margin-right: 0.25rem; font-size: 0.85rem; }

.info-block {
    padding: 0.75rem 1rem; background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 0.75rem; font-size: 0.85rem;
}
.info-block p { margin-bottom: 0.25rem; }

/* Tables */
.table-wrap { overflow-x: auto; }

.data-table {
    width: 100%; border-collapse: collapse;
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    font-size: 0.85rem;
}
.data-table thead { background: #f0f1f3; }
.data-table th {
    text-align: left; padding: 0.65rem 1rem;
    font-weight: 600; font-size: 0.75rem;
    text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--text-light); border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
.data-table td {
    padding: 0.7rem 1rem; border-bottom: 1px solid var(--border);
    vertical-align: top; color: var(--text);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #fafbfc; }
.data-table tbody tr.row-hidden { display: none; }
.data-table tbody tr.row-highlight { background: rgba(26,108,219,0.04); }

.email-list { display: flex; flex-direction: column; gap: 0.15rem; margin-top: 0.2rem; }
.email-list a { font-size: 0.8rem; white-space: nowrap; }
.email-list a i { font-size: 0.7rem; margin-right: 0.15rem; }

.muted { color: var(--text-muted); font-size: 0.8rem; font-style: italic; }
.muted i { margin-right: 0.2rem; }

/* Badges */
.badge {
    display: inline-block; padding: 0.15rem 0.55rem;
    font-size: 0.65rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.03em; border-radius: 999px; white-space: nowrap;
}
.badge.godaddy { color: var(--godaddy); background: rgba(0,131,138,0.08); border: 1px solid rgba(0,131,138,0.2); }
.badge.hostinger { color: var(--hostinger); background: rgba(90,48,196,0.08); border: 1px solid rgba(90,48,196,0.2); }
.badge.webtors { color: var(--webtors); background: rgba(212,96,10,0.08); border: 1px solid rgba(212,96,10,0.2); }

.status-active { color: var(--green); font-weight: 500; }
.status-active i { margin-right: 0.2rem; }

.role-primary { color: var(--green); font-weight: 600; font-size: 0.8rem; }
.role-primary i { font-size: 0.65rem; margin-right: 0.15rem; }

.text-green { color: var(--green); margin-right: 0.3rem; }
.text-red { color: #dc2626; margin-right: 0.3rem; }

/* Notice box */
.notice {
    display: flex; align-items: flex-start; gap: 0.6rem;
    padding: 0.85rem 1rem; margin-bottom: 1.25rem;
    background: #fef3c7; border: 1px solid #f59e0b; border-radius: var(--radius);
    font-size: 0.85rem; color: #92400e; line-height: 1.5;
}
.notice i { color: #d97706; margin-top: 0.2rem; flex-shrink: 0; }

/* Tags */
.exclusive-tag, .no-access-tag {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.1rem 0.5rem; font-size: 0.6rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.03em;
    border-radius: 999px; margin-left: 0.5rem; vertical-align: middle;
}
.exclusive-tag {
    color: var(--green); background: rgba(22,163,74,0.08); border: 1px solid rgba(22,163,74,0.25);
}
.exclusive-tag i { font-size: 0.5rem; }
.no-access-tag {
    color: #dc2626; background: rgba(220,38,38,0.06); border: 1px solid rgba(220,38,38,0.2);
}
.no-access-tag i { font-size: 0.5rem; }

/* No results */
.no-results {
    text-align: center; padding: 2rem; color: var(--text-muted); font-size: 0.9rem;
}
.no-results i { font-size: 2rem; display: block; margin-bottom: 0.5rem; opacity: 0.4; }

/* Summary */
.summary-list {
    list-style: none; display: flex; flex-direction: column; gap: 0.6rem;
    padding: 1rem 1.25rem; background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius);
}
.summary-list li {
    display: flex; align-items: flex-start; gap: 0.5rem;
    font-size: 0.85rem; color: var(--text-light); line-height: 1.55;
}
.summary-list li i { margin-top: 0.25rem; flex-shrink: 0; }

/* Footer */
.footer {
    border-top: 1px solid var(--border); padding: 1rem 0;
    background: var(--white); font-size: 0.8rem; color: var(--text-light);
}
.footer-inner {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}
.footer i { margin-right: 0.2rem; }

/* Back to top */
.back-to-top {
    position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 50;
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    background: var(--white); color: var(--text); border: 1px solid var(--border);
    border-radius: 8px; cursor: pointer; box-shadow: var(--shadow); font-size: 0.8rem;
    transition: all 150ms;
}
.back-to-top:hover { border-color: var(--link); color: var(--link); }
.back-to-top.visible { display: flex !important; }

/* ===== Mobile ===== */
@media (max-width: 768px) {
    html { scroll-padding-top: 60px; }
    .header-info { display: none; }
    .header h1 { font-size: 1.1rem; }
    .section h2 { font-size: 1.05rem; }
    .sub-grid { grid-template-columns: 1fr; gap: 1.25rem; }

    /* Responsive table: stack on mobile */
    .data-table thead { display: none; }
    .data-table, .data-table tbody, .data-table tr, .data-table td {
        display: block; width: 100%;
    }
    .data-table tr {
        margin-bottom: 0.75rem; border: 1px solid var(--border);
        border-radius: var(--radius); overflow: hidden; background: var(--white);
    }
    .data-table td {
        padding: 0.55rem 0.875rem; border-bottom: 1px solid #f0f0f0;
        position: relative; padding-left: 40%;
        text-align: left; min-height: 2rem;
    }
    .data-table td:last-child { border-bottom: none; }
    .data-table td::before {
        content: attr(data-label);
        position: absolute; left: 0.875rem; top: 0.55rem;
        width: 35%; font-size: 0.7rem; font-weight: 600;
        text-transform: uppercase; letter-spacing: 0.04em;
        color: var(--text-muted); white-space: nowrap;
    }
    /* Single-column tables (responsibilities) don't need labels */
    .data-table td:only-child { padding-left: 0.875rem; }
    .data-table td:only-child::before { display: none; }

    .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .container { padding: 0 0.75rem; }
    .nav-link { padding: 0.35rem 0.65rem; font-size: 0.75rem; }
    .search-box input { font-size: 0.85rem; padding: 0.6rem 2.25rem 0.6rem 2.25rem; }
    .data-table td { padding-left: 42%; font-size: 0.8rem; }
    .data-table td::before { font-size: 0.65rem; }
}
