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

:root {
    --color-bg: #f8f9fa;
    --color-surface: #ffffff;
    --color-primary: #1a1a2e;
    --color-accent: #e94560;
    --color-accent-hover: #c73a52;
    --color-text: #2d2d2d;
    --color-text-light: #6c757d;
    --color-border: #e0e0e0;
    --color-link: #0f3460;
    --color-link-hover: #e94560;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: 0.2s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Typography ── */
h1 { font-size: 2rem; font-weight: 700; color: var(--color-primary); }
h2 { font-size: 1.25rem; font-weight: 600; color: var(--color-text-light); }

a {
    color: var(--color-link);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--color-link-hover);
}

/* ── Container ── */
.container {
    width: 92%;
    max-width: 1100px;
    margin: 0 auto;
}

/* ── Header ── */
header {
    background: var(--color-primary);
    background-image: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    padding: 1.5rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

header img {
    height: 48px;
    width: auto;
    border-radius: 6px;
}

.header-text {
    flex: 1;
    min-width: 200px;
}

.header-text .site-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.header-text .site-tagline {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.65);
    margin-top: 2px;
}

/* ── Hamburger Button ── */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
    z-index: 110;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

#menu {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

#menu a {
    color: rgba(255,255,255,0.85);
    padding: 0.45rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
}

#menu a:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* ── Breadcrumb ── */
.breadcrumb {
    padding: 1rem 0;
    margin-bottom: 0.5rem;
}

.breadcrumb h2 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-light);
}

.breadcrumb h2 a {
    color: var(--color-link);
}

/* ── Main Content ── */
#main_content {
    flex: 1;
}

.page-section {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.page-section p {
    color: var(--color-text);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.page-section strong {
    color: var(--color-primary);
}

/* ── Data Table (List & Search results) ── */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.data-table thead th {
    background: var(--color-primary);
    color: #fff;
    padding: 0.85rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
}

.data-table tbody tr {
    transition: background var(--transition);
}

.data-table tbody tr:hover {
    background: #f0f4ff;
}

.data-table tbody td {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.95rem;
    vertical-align: top;
}

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

.data-table tbody td a {
    color: var(--color-link);
    font-weight: 500;
}

.data-table tbody td a:hover {
    color: var(--color-accent);
}

/* ── Detail Page ── */
.detail-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.detail-card .card-header {
    background: var(--color-primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.detail-row {
    display: flex;
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition);
}

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

.detail-row:hover {
    background: #f8f9ff;
}

.detail-label {
    flex: 0 0 180px;
    padding: 0.85rem 1.25rem;
    font-weight: 600;
    color: var(--color-text-light);
    font-size: 0.9rem;
    background: #fafbfc;
    border-right: 1px solid var(--color-border);
}

.detail-value {
    flex: 1;
    padding: 0.85rem 1.25rem;
    font-size: 0.95rem;
    word-break: break-word;
}

.detail-value a {
    color: var(--color-link);
}

.detail-value a:hover {
    color: var(--color-accent);
}

/* ── Search Form ── */
.search-form {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}

.search-form form {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.search-form input[type="text"] {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    outline: none;
    transition: border-color var(--transition);
    font-family: inherit;
}

.search-form input[type="text"]:focus {
    border-color: var(--color-accent);
}

.search-form input[type="submit"],
.btn-primary {
    padding: 0.75rem 1.75rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.search-form input[type="submit"]:hover,
.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
}

/* ── Complaint Block ── */
.complaint-card {
    background: #fff8f0;
    border-left: 4px solid #f0a500;
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ── Avatar / Social Block ── */
.social-card {
    background: #f0f4ff;
    border-left: 4px solid var(--color-link);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1rem 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.7;
}

.social-card a {
    word-break: break-all;
}

/* ── Footer ── */
footer {
    background: var(--color-primary);
    color: rgba(255,255,255,0.6);
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
    font-size: 0.85rem;
}

footer strong {
    color: rgba(255,255,255,0.85);
}

/* ── Info Text ── */
.intro-text {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

/* ── 404 Page ── */
.error-page {
    text-align: center;
    padding: 4rem 1rem;
}

.error-page h1 {
    font-size: 5rem;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.error-page p {
    color: var(--color-text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    header .container {
        flex-wrap: nowrap;
        position: relative;
    }

    header img {
        height: 40px;
    }

    .hamburger {
        display: flex;
        margin-left: auto;
    }

    #menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-primary);
        flex-direction: column;
        padding: 0.5rem 0;
        box-shadow: var(--shadow-lg);
        border-radius: 0 0 var(--radius) var(--radius);
        z-index: 105;
    }

    #menu.open {
        display: flex;
    }

    #menu a {
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
        border-radius: 0;
    }

    #menu a:hover {
        background: rgba(255,255,255,0.1);
    }

    .page-section {
        padding: 1.25rem;
    }

    .search-form {
        padding: 1rem 1.25rem;
    }

    .search-form form {
        flex-direction: column;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody tr {
        display: block;
        padding: 0.85rem 1rem;
        border-bottom: 1px solid var(--color-border);
    }

    .data-table tbody td {
        display: block;
        padding: 0.25rem 0;
        border-bottom: none;
        font-size: 0.9rem;
    }

    .data-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--color-text-light);
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        display: block;
        margin-bottom: 2px;
    }

    .detail-row {
        flex-direction: column;
    }

    .detail-label {
        flex: none;
        border-right: none;
        border-bottom: none;
        padding: 0.65rem 1rem 0.15rem;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .detail-value {
        padding: 0.15rem 1rem 0.75rem;
    }

    h1 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
    }

    .page-section {
        padding: 1rem;
        border-radius: var(--radius);
    }
}
