* {
    box-sizing: border-box;
}

:root {
    --primary: #1746a2;
    --primary-dark: #0f2f73;
    --primary-soft: #eaf1ff;
    --accent: #f6b73c;
    --accent-dark: #f59e0b;
    --bg-dark: #07152f;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --success: #16a34a;
    --danger: #dc2626;
    --white: #ffffff;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(23, 70, 162, 0.60), transparent 34%),
        radial-gradient(circle at top right, rgba(246, 183, 60, 0.26), transparent 30%),
        linear-gradient(135deg, #07152f 0%, #0b1f47 48%, #07152f 100%);
    color: var(--text);
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    pointer-events: none;
    z-index: 0;
}

.page {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: 34px 14px 70px;
}

.admin-layout {
    max-width: 1120px;
}

.logo-box {
    text-align: center;
    color: white;
    margin-bottom: 22px;
}

.logo-circle {
    width: 88px;
    height: 88px;
    border-radius: 24px;
    background: linear-gradient(145deg, #ffffff, #edf3ff);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 27px;
    margin-bottom: 14px;
    box-shadow: 0 18px 45px rgba(0,0,0,.28);
    border: 1px solid rgba(255,255,255,.70);
    letter-spacing: .5px;
    overflow: hidden;
}

/* Logo gambar / favicon Babehsugih */
.logo-circle-image img {
    width: 72%;
    height: 72%;
    object-fit: contain;
    display: block;
}

.logo-box h2 {
    margin: 0;
    font-size: 30px;
    letter-spacing: .2px;
}

.logo-box p {
    max-width: 700px;
    margin: 10px auto 0;
    color: rgba(255,255,255,.84);
    line-height: 1.6;
    font-size: 15px;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 0 0 18px;
}

.trust-item {
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(255,255,255,.65);
    border-radius: 18px;
    padding: 15px;
    box-shadow: 0 14px 36px rgba(0,0,0,.18);
    color: #111827;
}

.trust-item strong {
    display: block;
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 6px;
}

.trust-item span {
    display: block;
    font-size: 12px;
    color: #4b5563;
    line-height: 1.45;
}

.card {
    background: rgba(255,255,255,.98);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 22px 70px rgba(0,0,0,.32);
    border: 1px solid rgba(255,255,255,.65);
}

.card-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 19px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.header-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    color: rgba(255,255,255,.72);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.header-label.dark {
    color: #1746a2 !important;
    background: #eaf1ff;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .05em;
}

.card-header h1 {
    font-size: 22px;
    margin: 0;
    line-height: 1.3;
}

.card-body {
    padding: 24px;
}

.notice {
    background: linear-gradient(135deg, #f4f7ff, #ffffff);
    border: 1px solid #dbe5ff;
    padding: 14px 15px;
    border-radius: 16px;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.55;
    color: #1f2937;
}

.notice::before {
    content: "✓ ";
    color: var(--success);
    font-weight: 900;
}

.section-title {
    margin: 20px 0 14px;
    padding-top: 4px;
}

.section-title:first-of-type {
    margin-top: 4px;
}

.section-title h3 {
    margin: 0 0 5px;
    font-size: 17px;
    color: #111827;
}

.section-title p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field {
    margin-bottom: 14px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 7px;
    color: #1f2937;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d4dbea;
    border-radius: 14px;
    padding: 13px 14px;
    font-size: 15px;
    outline: none;
    background: #ffffff;
    color: var(--text);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

input::placeholder,
textarea::placeholder {
    color: #9ca3af;
}

textarea {
    min-height: 138px;
    resize: vertical;
    line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(23,70,162,.12);
    background: #fcfdff;
}

.form-note {
    margin-top: -4px;
    margin-bottom: 16px;
    font-size: 12px;
    color: var(--muted);
    background: #f9fafb;
    border: 1px solid #edf0f5;
    border-radius: 12px;
    padding: 10px 12px;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 0;
    border-radius: 14px;
    padding: 12px 17px;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
    font-size: 15px;
    transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
    min-height: 44px;
}

.btn:hover {
    transform: translateY(-1px);
    opacity: .96;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 10px 24px rgba(23,70,162,.25);
}

.btn-warning {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #111827;
    box-shadow: 0 10px 24px rgba(245,158,11,.22);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-light {
    background: var(--primary-soft);
    color: var(--primary-dark);
    border: 1px solid #dbe5ff;
}

.btn-small {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 12px;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.ticket-code {
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
    color: white;
    padding: 13px 16px;
    border-radius: 16px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 1px;
    display: inline-block;
    margin: 10px 0 12px;
    box-shadow: 0 12px 26px rgba(15,23,42,.22);
}

.ticket-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.ticket-summary h3 {
    margin: 12px 0 0;
    font-size: 22px;
    color: #111827;
}

.ticket-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 14px 0 18px;
}

.detail-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px 14px;
}

.detail-item strong {
    display: block;
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 5px;
}

.detail-item span {
    display: block;
    color: #111827;
    font-size: 14px;
    font-weight: 700;
    word-break: break-word;
}

.attachment-box {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 18px;
    color: #111827;
}

.attachment-box strong {
    margin-right: 6px;
}

.attachment-box a {
    font-weight: 800;
    color: #1746a2;
}

.message-list {
    margin-top: 12px;
}

.message {
    border-radius: 16px;
    padding: 13px 14px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    line-height: 1.55;
}

.message.user {
    background: #f9fafb;
}

.message.admin {
    background: #eef4ff;
    border-color: #c7d9ff;
}

.message-meta {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 7px;
}

.message-attachment {
    margin: 12px 0 0;
}

.message-attachment a {
    font-weight: 800;
    color: #1746a2;
}

.status {
    display: inline-block;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 900;
    background: var(--primary-soft);
    color: var(--primary-dark);
    margin-right: 5px;
}

.alert {
    padding: 14px;
    border-radius: 16px;
    margin-bottom: 16px;
    line-height: 1.55;
}

.alert.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 22px 0;
}

.dashboard-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #f3f6ff;
    color: #1746a2;
    border: 1px solid #dbe5ff;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.filter-pill.active {
    background: #1746a2;
    color: #ffffff;
    border-color: #1746a2;
}

.empty-state {
    text-align: center;
    color: #6b7280;
    padding: 20px;
    font-weight: 700;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: white;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: #f9fafb;
}

.admin-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

a {
    color: var(--primary);
}

.footer-note {
    text-align: center;
    color: rgba(255,255,255,.82);
    font-size: 12px;
    line-height: 1.6;
    margin-top: 18px;
}

@media (max-width: 640px) {
    .page {
        padding-top: 24px;
    }

    .trust-grid {
        grid-template-columns: 1fr;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .card {
        border-radius: 20px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-body {
        padding: 18px;
    }

    .logo-circle {
        width: 78px;
        height: 78px;
        border-radius: 20px;
        font-size: 23px;
    }

    .logo-circle-image img {
        width: 72%;
        height: 72%;
    }

    .logo-box h2 {
        font-size: 24px;
    }

    .actions .btn {
        width: 100%;
    }

    .ticket-code {
        font-size: 18px;
        word-break: break-all;
    }

    .ticket-summary {
        flex-direction: column;
    }

    .ticket-badges {
        justify-content: flex-start;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .admin-nav {
        width: 100%;
    }

    .admin-nav .btn {
        width: 100%;
    }

    table {
        min-width: 760px;
    }
}