@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #2563eb;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #0f172a;
    --text-muted: #64748b;
    --border-color: #f1f5f9;
    --danger-color: #ef4444;
    --shadow-soft: 0 10px 30px -5px rgba(0, 0, 0, 0.04), 0 4px 12px -2px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 20px 35px -10px rgba(37, 99, 235, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    min-height: 100vh;
}

/* ----------------------------------------------------
   1. DESKTOP BASE LAYOUT
---------------------------------------------------- */
.sidebar {
    width: 230px;
    background: #ffffff;
    padding: 30px 20px;
    flex-shrink: 0;
    min-height: 100vh;
    border-right: 1px solid var(--border-color);
}

.sidebar h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 30px;
    letter-spacing: -0.3px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 14px;
    margin-bottom: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar nav a:hover, 
.sidebar nav a.active {
    background: #eff6ff;
    color: var(--primary-color);
    transform: translateX(4px);
}

.main-content {
    flex-grow: 1;
    padding: 36px 44px;
    width: calc(100% - 230px);
}

.header-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.header-title h1 {
    font-size: 1.65rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.5px;
}

/* Floating Card Component */
.card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    padding: 28px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

th {
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    vertical-align: middle;
    color: #334155;
    white-space: nowrap;
}

tr:last-child td {
    border-bottom: none;
}

tr {
    transition: background-color 0.2s ease;
}

tr:hover {
    background-color: #f8fafc;
}

/* Soft Badges */
.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-gender {
    background-color: #f0f9ff;
    color: #0284c7;
}

.badge-jabatan {
    background-color: #fffbeb;
    color: #b45309;
}

/* Action Group */
.btn-action-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Soft Tactile Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:active {
    transform: scale(0.96); /* Gestur membal halus saat ditekan */
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.btn-danger {
    background-color: #fef2f2;
    color: var(--danger-color);
}

.btn-danger:hover {
    background-color: var(--danger-color);
    color: white;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 0.8rem;
    border-radius: 10px;
}

/* Soft Input Control */
.form-control {
    width: 100%;
    padding: 12px 18px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    font-size: 0.92rem;
    outline: none;
    background-color: #f8fafc;
    transition: all 0.25s ease;
}

.form-control:focus {
    background-color: #ffffff;
    border-color: #a5b4fc;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* ----------------------------------------------------
   2. SOFT MOBILE GESTURE & RESPONSIVE DESIGN (HP)
---------------------------------------------------- */
@media screen and (max-width: 768px) {
    body {
        flex-direction: column;
        background-color: #f1f5f9;
    }

    /* Soft App-Bar Header */
    .sidebar {
        width: 100%;
        min-height: auto;
        padding: 16px 20px;
        background: #ffffff;
        box-shadow: var(--shadow-soft);
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .sidebar h2 {
        font-size: 1.1rem;
        margin-bottom: 12px;
        text-align: center;
    }

    .sidebar nav {
        display: flex;
        justify-content: center;
        gap: 8px;
        background-color: #f8fafc;
        padding: 6px;
        border-radius: 16px;
    }

    .sidebar nav a {
        margin-bottom: 0;
        padding: 10px 18px;
        font-size: 0.85rem;
        border-radius: 12px;
        flex: 1;
        justify-content: center;
    }

    .sidebar nav a:hover, 
    .sidebar nav a.active {
        background: #ffffff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        transform: none;
    }

    .main-content {
        width: 100%;
        padding: 20px 16px 40px 16px;
    }

    .header-title {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .header-title h1 {
        font-size: 1.35rem;
    }

    .card {
        padding: 20px 16px;
        border-radius: 18px;
    }

    /* Smooth Touch Scroll untuk Tabel */
    .table-responsive {
        border-radius: 12px;
        box-shadow: inset -10px 0 10px -10px rgba(0,0,0,0.05); /* Indikator scroll halus di HP */
    }

    .btn {
        width: 100%;
        padding: 12px;
        border-radius: 14px;
    }

    .btn-action-group {
        width: 100%;
    }

    .btn-action-group .btn {
        flex: 1;
    }
}