:root {
    --green: #18864b;
    --green-dark: #0d6235;
    --green-soft: #eaf7f0;
    --ink: #1d2939;
    --muted: #667085;
    --line: #e4e7ec;
    --bg: #f6f8f7;
    --white: #ffffff;
    --danger: #c62828;
    --warning: #9a6700;
}

/* =========================
   GLOBAL
========================= */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family:
        Arial,
        Helvetica,
        sans-serif;
    background: var(--bg);
    color: var(--ink);
}

a {
    text-decoration: none;
    color: inherit;
}

/* =========================
   APP
========================= */
.app-shell {
    min-height: 100vh;
}

/* =========================
   SIDEBAR
========================= */
.main-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid var(--line);
    z-index: 1000;
    overflow-x: hidden;
    overflow-y: auto;
    transition:
        width 0.25s ease,
        transform 0.25s ease;
}

/* SIDEBAR KECIL */
.main-sidebar.collapsed {
    width: 74px;
}

/* =========================
   BRAND
========================= */
.brand {
    height: 80px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--line);
}

.brand-logo {
    width: 50px;
    min-width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.brand-text {
    white-space: nowrap;
}

.brand-text strong {
    display: block;
    font-size: 15px;
    color: var(--ink);
}
.brand-text span {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--muted);
}

/* LOGO SAAT SIDEBAR KECIL */
.main-sidebar.collapsed .brand {
    justify-content: center;
    padding-left: 12px;
    padding-right: 12px;
}
.main-sidebar.collapsed .brand-text {
    display: none;
}

/* =========================
   SEARCH
========================= */
.sidebar-search {
    padding: 14px 10px;
}
.sidebar-search input {
    width: 100%;
    height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #ffffff;
    color: var(--ink);
    outline: none;
}
.sidebar-search input:focus {
    border-color: var(--green);
    box-shadow:
        0 0 0 2px
        rgba(24, 134, 75, 0.12);
}

/* HILANG SAAT SIDEBAR KECIL */
.main-sidebar.collapsed .sidebar-search {
    display: none;
}

/* =========================
   MENU
========================= */
.sidebar-nav {
    display: grid;
    gap: 5px;
    padding: 8px 10px;
}

.sidebar-nav .nav-link {
    height: 44px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    border-radius: 8px;
    color: #344054;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.sidebar-nav .nav-link:hover {
    background: var(--green-soft);
    color: var(--green-dark);
}

.sidebar-nav .nav-link.active {
    background: var(--green);
    color: #ffffff;
}

/* ICON */
.menu-icon {
    width: 24px;
    min-width: 24px;
    text-align: center;
    font-size: 17px;
}

/* TEXT */
.menu-text {
    white-space: nowrap;
}

/* SIDEBAR KECIL */
.main-sidebar.collapsed .nav-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}
.main-sidebar.collapsed .menu-text {
    display: none;
}

/* =========================
   SIDEBAR USER
========================= */
.sidebar-foot {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 15px;
}

.user-mini {
    padding: 12px;
    margin-bottom: 10px;
    background: #f9fafb;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.user-mini strong {
    display: block;
    font-size: 14px;
}

.user-mini span {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--muted);
}
.main-sidebar.collapsed .sidebar-foot {
    display: none;
}

/* =========================
   CONTENT
========================= */
.content {
    min-height: 100vh;
    margin-left: 250px;
    padding: 0 28px 36px;
    min-width: 0;
    transition:
        margin-left 0.25s ease;
}

/* CONTENT SIDEBAR KECIL */
.content.sidebar-collapsed {
    margin-left: 74px;
}

/* =========================
   TOPBAR
========================= */
.topbar {
    min-height: 80px;

    display: flex;

    align-items: center;

    gap: 15px;

    padding: 18px 0;
}

.topbar-title {

    flex: 1;

    min-width: 0;
}

.topbar h1 {

    margin: 0;

    font-size: 24px;
}

.topbar p {

    margin: 5px 0 0;

    color: var(--muted);

    font-size: 13px;
}

.topbar-user {

    padding: 9px 12px;

    background: #ffffff;

    border: 1px solid var(--line);

    border-radius: 8px;

    font-size: 13px;
}


/* =========================
   HAMBURGER
========================= */

.sidebar-toggle {

    width: 42px;
    height: 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 0;

    border-radius: 8px;

    background: var(--green);

    color: #ffffff;

    font-size: 22px;

    cursor: pointer;

    flex-shrink: 0;
}

.sidebar-toggle:hover {

    background: var(--green-dark);
}


/* =========================
   GRID
========================= */

.grid {

    display: grid;

    gap: 18px;
}

.grid-4 {

    grid-template-columns:
        repeat(4, minmax(0, 1fr));
}

.grid-3 {

    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}

.grid-2 {

    grid-template-columns:
        repeat(2, minmax(0, 1fr));
}


/* =========================
   CARD
========================= */

.card {

    background: #ffffff;

    border: 1px solid var(--line);

    border-radius: 12px;

    padding: 18px;

    box-shadow:
        0 1px 2px
        rgba(16, 24, 40, 0.03);
}

.card h2,
.card h3 {

    margin: 0 0 12px;
}


/* =========================
   BUTTON
========================= */

.btn {

    border: 0;

    border-radius: 8px;

    padding: 10px 14px;

    font-weight: 700;

    cursor: pointer;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 6px;
}

.btn-primary {

    background: var(--green);

    color: #ffffff;
}

.btn-primary:hover {

    background: var(--green-dark);
}

.btn-light {

    background: #ffffff;

    border: 1px solid var(--line);

    color: #344054;
}

.btn-danger {

    background: #fef3f2;

    color: #b42318;

    border: 1px solid #fecdca;
}

.btn-warning {

    background: #fffaeb;

    color: #b54708;

    border: 1px solid #fedf89;
}

.btn-block {

    width: 100%;
}


/* =========================
   TABLE
========================= */

.table-wrap {

    overflow: auto;

    background: #ffffff;

    border: 1px solid var(--line);

    border-radius: 12px;
}

table {

    border-collapse: collapse;

    width: 100%;

    min-width: 760px;
}

th,
td {

    text-align: left;

    padding: 12px 14px;

    border-bottom: 1px solid var(--line);

    font-size: 13px;

    vertical-align: top;
}

th {

    background: #f9fafb;

    color: #475467;

    font-size: 12px;

    text-transform: uppercase;

    letter-spacing: .03em;
}

tr:last-child td {

    border-bottom: 0;
}


/* =========================
   FORM
========================= */

.form-card {

    max-width: 760px;
}

.form-grid {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 15px;
}

.form-group {

    display: grid;

    gap: 7px;
}

.form-group.full {

    grid-column: 1 / -1;
}

label {

    font-size: 13px;

    font-weight: 700;
}

input,
select,
textarea {

    width: 100%;

    border: 1px solid #d0d5dd;

    border-radius: 8px;

    padding: 10px 11px;

    font: inherit;

    background: #ffffff;

    color: #101828;
}

textarea {

    min-height: 95px;

    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {

    outline: 2px solid #b7e4ca;

    border-color: var(--green);
}


/* =========================
   CAMERA
========================= */

.camera-box {

    display: grid;

    gap: 10px;
}

.camera-preview {

    background: #101828;

    border-radius: 10px;

    overflow: hidden;

    aspect-ratio: 4 / 3;

    display: grid;

    place-items: center;

    color: #ffffff;
}

.camera-preview video,
.camera-preview img {

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.camera-actions {

    display: flex;

    gap: 8px;

    flex-wrap: wrap;
}

.location-box {

    background: #f9fafb;

    border: 1px solid var(--line);

    border-radius: 8px;

    padding: 10px;

    font-size: 12px;

    color: #475467;
}

.quick-actions {

    display: flex;

    gap: 10px;

    flex-wrap: wrap;
}


/* =========================
   RESPONSIVE TABLET
========================= */

@media (max-width: 1000px) {

    .grid-4 {

        grid-template-columns:
            repeat(2, 1fr);
    }
}


/* =========================
   MOBILE
========================= */

@media (max-width: 760px) {

    .main-sidebar {
        width: 250px;
        transform: translateX(-100%);
    }

    .main-sidebar.mobile-open {
        transform: translateX(0);
    }

    .content,
    .content.sidebar-collapsed {
        margin-left: 0;
        padding: 0 16px 28px;
    }

    .topbar {
        min-height: 70px;
        padding: 12px 0;
    }

    .topbar-user {
        display: none;
    }

    .grid-4,
    .grid-3,
    .grid-2,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full {
        grid-column: auto;
    }
}


/* =========================
   PASSWORD INPUT
========================= */

.password-wrap {
    position: relative;
    width: 100%;
}

.password-wrap input {
    width: 100%;
    height: 42px;
    padding: 10px 45px 10px 11px;

    border: 1px solid #d0d5dd;
    border-radius: 8px;

    background: #ffffff;
    color: #101828;

    font: inherit;
}

.password-wrap input:focus {
    outline: 2px solid #b7e4ca;
    border-color: var(--green);
}

.toggle-password {
    position: absolute;

    top: 50%;
    right: 8px;

    transform: translateY(-50%);

    width: 32px;
    height: 32px;

    padding: 0;
    margin: 0;

    border: 0;
    border-radius: 6px;

    background: transparent;
    color: #667085;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 17px;
    line-height: 1;
}

.toggle-password:hover {
    background: #f2f4f7;
    color: var(--green);
}

.toggle-password:focus {
    outline: 2px solid #b7e4ca;
}

/* =========================
   LOGIN
========================= */

body.login-page {
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 30px 15px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--bg);
    overflow-x: hidden;
}

.login-card {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 30px;

    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 15px;

    box-shadow: 0 5px 25px rgba(16, 24, 40, 0.08);
}

.login-brand {
    text-align: center;
    margin-bottom: 25px;
}

.login-brand h1 {
    margin: 15px 0 8px;
    font-size: 28px;
}

.login-brand p {
    margin: 0;
    color: var(--muted);
}

.login-brand .brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-card .form-group {
    margin-bottom: 18px;
}

.login-card input[type="text"],
.login-card input[type="password"] {
    width: 100%;
    max-width: 100%;
}

.login-card .btn-block {
    width: 100%;
}

.login-info {
    margin-top: 20px;
    padding: 15px;

    background: var(--green-soft);
    border-radius: 8px;

    font-size: 14px;
    line-height: 1.5;
}

/* Tampilan HP */
@media (max-width: 576px) {

    body.login-page {
        padding: 20px 12px;
    }

    .login-card {
        max-width: 100%;
        padding: 22px 18px;
    }

    .login-brand h1 {
        font-size: 23px;
    }
}

/* ===============================
   DATA KARYAWAN
   =============================== */

.employee-toolbar {
    margin-bottom: 30px !important;
    padding-bottom: 5px !important;
}

.employee-toolbar .employee-search {
    margin: 0 !important;
}

.employee-toolbar .btn-add-employee {
    margin: 0 !important;
    margin-left: 25px !important;
    white-space: nowrap !important;
}