        :root {
            --bg-main: #f3f5ff;
            --bg-card: #ffffff;
            --primary: #3949ab;
            --primary-soft: #e8eaf6;
            --primary-soft-2: #c5cae9;
            --accent: #ffb300;
            --danger: #e53935;
            --text-main: #1f2933;
            --text-muted: #6b7280;
            --border-soft: #e0e7ff;
            --radius-lg: 14px;
            --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.07);
            /* Warna untuk jenis kata */
            --color-isim: #1976d2; /* Biru */
            --color-fiil: #d32f2f; /* Merah */
            --color-harf: #388e3c; /* Hijau */
            --color-mixed: #7b1fa2; /* Ungu untuk jenis campuran */
        }

        * {
            box-sizing: border-box;
        }

        body {
            font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            margin: 0;
            padding: 0;
            color: var(--text-main);
            background:
                radial-gradient(circle at top left, rgba(129,140,248,0.15), transparent 55%),
                radial-gradient(circle at bottom right, rgba(236, 72, 153, 0.12), transparent 55%),
                var(--bg-main);
        }

        header {
            background: linear-gradient(120deg, #283593, #3949ab, #5c6bc0);
            color: #fff;
            padding: 1.1rem 1.5rem 1rem;
            box-shadow: 0 8px 20px rgba(15, 23, 42, 0.3);
            position: sticky;
            top: 0;
            z-index: 20;
            text-align: center;
        }
        header h1 {
            margin: 0;
            font-size: 1.3rem;
            letter-spacing: 0.03em;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            gap: .6rem;
        }
        header h1::before {
            content: "﷽";
            font-family: "Scheherazade New", "Amiri", serif;
            font-size: 1.4rem;
        }
        header .subtitle {
            margin-top: .3rem;
            font-size: .85rem;
            opacity: .9;
        }

        main {
            padding: 1.3rem 1.5rem 2rem;
            max-width: 1150px;
            margin: 0 auto;
            overflow-y: hidden;
        }

        .panel {
            background: var(--bg-card);
            border-radius: var(--radius-lg);
            padding: 1.1rem 1.2rem 1.2rem;
            box-shadow: var(--shadow-soft);
            margin-bottom: 1.1rem;
            border: 1px solid rgba(129,140,248,0.3);
            position: relative;
            overflow: hidden;
        }
        .panel::before {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, rgba(129,140,248,0.12), transparent 40%);
            opacity: .8;
            pointer-events: none;
        }
        .panel-inner {
            position: relative;
            z-index: 1;
        }
        .panel h2 {
            margin-top: 0;
            font-size: 1.05rem;
            display: flex;
            align-items: center;
            gap: .45rem;
        }
        .panel h2::before {
            content: "";
            width: 7px;
            height: 7px;
            border-radius: 999px;
            background: var(--accent);
            box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.5);
        }

        .form-row {
            display: flex;
            flex-wrap: wrap;
            gap: .8rem;
            margin-bottom: 1rem;
        }
        .form-group {
            display: flex;
            flex-direction: column;
            min-width: 130px;
            flex: 1;
            max-width: 220px;
        }
        label {
            font-size: .8rem;
            margin-bottom: .25rem;
            color: var(--text-muted);
        }
        input[type="number"],
        select {
            padding: .45rem .6rem;
            border-radius: 8px;
            border: 1px solid var(--border-soft);
            font-size: .9rem;
            background: #f9fafb;
            transition: border-color .2s, box-shadow .2s, background .2s;
        }
        input[type="number"]:focus,
        select:focus {
            outline: none;
            border-color: #6366f1;
            background: #ffffff;
            box-shadow: 0 0 0 2px rgba(129,140,248,0.35);
        }

        button {
            padding: .55rem 1.1rem;
            border-radius: 999px;
            border: none;
            cursor: pointer;
            font-size: .85rem;
            display: inline-flex;
            align-items: center;
            gap: .35rem;
            transition: transform .12s ease, box-shadow .12s ease, background .15s ease, filter .15s ease;
            white-space: nowrap;
        }
        button span.icon {
            font-size: 0.95em;
        }
        button[type="submit"] {
            background: linear-gradient(135deg, #3949ab, #6366f1);
            color: #fff;
            box-shadow: 0 8px 18px rgba(79,70,229,0.3);
        }
        button[type="submit"]:hover {
            transform: translateY(-1px);
            filter: brightness(1.03);
            box-shadow: 0 10px 22px rgba(79,70,229,0.35);
        }
        button.secondary {
            background: #e5e7eb;
            color: #111827;
            box-shadow: 0 4px 10px rgba(148,163,184,0.35);
        }
        button.secondary:hover {
            transform: translateY(-1px);
            filter: brightness(1.03);
        }
        button.danger {
            background: linear-gradient(135deg, #e53935, #ef5350);
            color: #fff;
            box-shadow: 0 8px 18px rgba(239,68,68,0.35);
        }
        button.danger:hover {
            transform: translateY(-1px);
            filter: brightness(1.03);
        }

        .status {
            font-size: .8rem;
            margin-top: .5rem;
            display: inline-flex;
            align-items: center;
            gap: .35rem;
            padding: .3rem .65rem;
            border-radius: 999px;
            background: #f3f4ff;
            color: var(--text-muted);
        }
        .status.ok {
            background: #ecfdf3;
            color: #166534;
        }
        .status.ok::before {
            content: "✔";
            font-size: .8rem;
        }
        .status.error {
            background: #fef2f2;
            color: #b91c1c;
        }
        .status.error::before {
            content: "⚠";
            font-size: .8rem;
        }

        details {
            margin-top: .6rem;
            border-radius: 10px;
            border: 1px solid #e5e7eb;
            padding: .25rem .6rem .6rem;
            background: #f9fafb;
        }
        summary {
            cursor: pointer;
            font-weight: 600;
            font-size: .9rem;
            display: flex;
            align-items: center;
            gap: .45rem;
        }
        summary::marker {
            color: #4f46e5;
        }
        .ayah-header {
            font-weight: 600;
            margin-top: .4rem;
            font-size: .85rem;
            color: var(--text-muted);
        }
        .ayah-text {
            margin-top: .35rem;
            padding: .45rem .55rem;
            border-radius: 10px;
            background: #eef2ff;
            font-size: 1.25rem;
            text-align: right;
            direction: rtl;
            font-family: "Scheherazade New", "Amiri", "Traditional Arabic", serif;
            border: 1px solid rgba(129,140,248,0.3);
        }

        table {
            border-collapse: collapse;
            width: 100%;
            margin-top: .35rem;
            font-size: .82rem;
            border-radius: 10px;
            overflow: hidden;
        }
        th, td {
            border: 1px solid #e5e7eb;
            padding: .25rem .4rem;
            vertical-align: top;
        }
        th {
            background: linear-gradient(135deg, #e0e7ff, #eef2ff);
            font-weight: 600;
            color: #111827;
        }
        tbody tr:nth-child(even) {
            background: #f9fafb;
        }
        tbody tr:hover {
            background: #eef2ff;
        }

        /* STYLING KHUSUS UNTUK KOLOM JENIS DENGAN WARNA */
        .jenis-isim {
            color: var(--color-isim);
            background-color: rgba(25, 118, 210, 0.08);
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 600;
            display: inline-block;
            border-left: 3px solid var(--color-isim);
        }
        .jenis-fiil {
            color: var(--color-fiil);
            background-color: rgba(211, 47, 47, 0.08);
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 600;
            display: inline-block;
            border-left: 3px solid var(--color-fiil);
        }
        .jenis-harf {
            color: var(--color-harf);
            background-color: rgba(56, 142, 60, 0.08);
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 600;
            display: inline-block;
            border-left: 3px solid var(--color-harf);
        }
        .jenis-mixed {
            color: var(--color-mixed);
            background-color: rgba(123, 31, 162, 0.08);
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 600;
            display: inline-block;
            border-left: 3px solid var(--color-mixed);
        }

        pre {
            background: #020617;
            color: #e5e7eb;
            padding: .8rem;
            border-radius: 12px;
            overflow-x: auto;
            font-size: .8rem;
            border: 1px solid #111827;
            box-shadow: 0 16px 34px rgba(15,23,42,0.65);
        }

        .meta {
            font-size: .8rem;
            margin-top: .4rem;
            color: var(--text-muted);
        }
        .meta code {
            background: #111827;
            color: #e5e7eb;
            padding: .1rem .35rem;
            border-radius: 999px;
            font-size: .78rem;
        }

        .badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: .05rem .45rem;
            border-radius: 999px;
            font-size: .7rem;
            background: #ecfeff;
            color: #0f766e;
            border: 1px solid #99f6e4;
        }

        .pill-info {
            display: inline-flex;
            align-items: center;
            gap: .4rem;
            padding: .18rem .55rem;
            border-radius: 999px;
            background: rgba(15,23,42,0.04);
            font-size: .78rem;
            color: var(--text-muted);
        }
        .pill-info strong {
            color: #111827;
        }

        /* Legend untuk warna jenis kata */
        .jenis-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 10px;
            margin-bottom: 10px;
        }
        .jenis-legend-item {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 0.75rem;
            padding: 3px 8px;
            border-radius: 4px;
            background: white;
            border: 1px solid #e5e7eb;
        }
        .jenis-legend-color {
            width: 12px;
            height: 12px;
            border-radius: 2px;
        }
        .legend-isim {
            background-color: var(--color-isim);
        }
        .legend-fiil {
            background-color: var(--color-fiil);
        }
        .legend-harf {
            background-color: var(--color-harf);
        }
        .legend-mixed {
            background-color: var(--color-mixed);
        }

        @media (max-width: 768px) {
            main { padding: 1rem .8rem 1.5rem; }
            .form-row { flex-direction: column; }
            .form-group { max-width: 100%; }
            header h1 { font-size: 1.1rem; }
        }

        @media (prefers-reduced-motion: reduce) {
            * {
                scroll-behavior: auto !important;
                transition: none !important;
            }
        }