* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

body {
    margin: 0;
    padding: 0;
    background-color: #f5f7f9;
    color: #111827;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

a {
    color: inherit;
}

.navbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 60px;
    padding: 12px 20px;
    background-color: #0c7536;
    color: white;
}

.company-name,
.logo {
    font-size: 1.15rem;
    font-weight: 700;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 6px;
    background: transparent;
    color: white;
    font-size: 1.05rem;
    cursor: pointer;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.15);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 1rem;
}

.user-nik {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
}

.app-shell {
    display: flex;
    padding-top: 60px;
}

.sidebar {
    position: fixed;
    top: 60px;
    bottom: 0;
    left: 0;
    width: 240px;
    padding: 16px;
    overflow-y: auto;
    background-color: #119546;
    color: white;
    transition: width 0.2s ease, transform 0.2s ease;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 6px 0;
    padding: 12px;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    cursor: pointer;
}

.menu-item:hover {
    background-color: #0c7536;
}

.menu-item.active {
    background-color: #2563eb;
}

.menu-item i {
    width: 20px;
    text-align: center;
}

.main-content {
    width: calc(100% - 240px);
    margin-left: 240px;
    padding: 24px;
    transition: width 0.2s ease, margin-left 0.2s ease;
}

.sidebar-collapsed .sidebar {
    width: 72px;
    padding-right: 10px;
    padding-left: 10px;
}

.sidebar-collapsed .menu-item {
    justify-content: center;
}

.sidebar-collapsed .menu-label {
    display: none;
}

.sidebar-collapsed .main-content {
    width: calc(100% - 72px);
    margin-left: 72px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.page-header h1,
.page-header h2 {
    margin: 0;
}

.panel {
    margin-bottom: 20px;
    padding: 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.panel h3 {
    margin-top: 0;
}

.table-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.table-search {
    position: relative;
    width: min(340px, 100%);
}

.table-search i {
    position: absolute;
    top: 50%;
    left: 12px;
    color: #64748b;
    transform: translateY(-50%);
}

.table-search-input {
    width: 100%;
    min-height: 40px;
    padding: 9px 12px 9px 36px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.95rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    align-items: end;
}

.filter-actions {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    grid-column: 1 / -1;
    margin-top: 4px;
}

.filter-actions-left {
    justify-content: flex-start;
}

.form-actions {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    grid-column: 1 / -1;
    margin-top: 4px;
}

.form-stack {
    max-width: 760px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 110px;
    resize: vertical;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus {
    color: #0c7536;
}

.remember-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 16px;
    color: #334155;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
}

.remember-option input {
    width: 16px;
    height: 16px;
    accent-color: #0c7536;
    cursor: pointer;
}

.btn,
.btn-primary,
.btn-login,
.pdf-btn,
.edit-btn,
.delete-btn,
.danger-btn,
#logoutBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 13px;
    border: 0;
    border-radius: 4px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.btn,
.btn-primary {
    background-color: #0c7536;
}

.btn:hover,
.btn-primary:hover {
    background-color: #095c2a;
}

.btn-secondary {
    background-color: #64748b;
}

.edit-btn {
    background-color: #2563eb;
}

.pdf-btn,
.delete-btn,
.danger-btn,
#logoutBtn {
    background-color: #e74c3c;
}

.pdf-btn:hover,
.delete-btn:hover,
.danger-btn:hover,
#logoutBtn:hover {
    background-color: #c0392b;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.ticket-table {
    width: 100%;
    margin-top: 12px;
    border-collapse: collapse;
    background-color: white;
}

.ticket-table th,
.ticket-table td {
    padding: 10px 12px;
    border: 1px solid #ddd;
    text-align: left;
    vertical-align: top;
}

.ticket-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.ticket-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.ticket-table tr:hover {
    background-color: #f1f1f1;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pending,
.status.pending {
    background-color: #ffc107;
    color: #111827;
}

.status-in-progress,
.status.in-progress {
    background-color: #17a2b8;
    color: white;
}

.status-resolved,
.status.resolved {
    background-color: #28a745;
    color: white;
}

.status-approved,
.status.approved {
    background-color: #0c7536;
    color: white;
}

.status-select {
    min-width: 130px;
    padding: 7px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.ticket-image {
    display: block;
    width: 72px;
    height: 54px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.empty-cell {
    text-align: center;
}

.login-page {
    position: relative;
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    font-family: "Poppins", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.24);
    pointer-events: none;
}

.login-box {
    position: relative;
    z-index: 1;
    width: 400px;
    max-width: 100%;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.92);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-weight: 700;
    text-decoration: none;
}

.login-brand img {
    width: 35px;
    height: auto;
}

.btn-login {
    width: 100%;
    background-color: #0c7536;
}

@media (max-width: 520px) {
    .login-page {
        align-items: flex-end;
        padding: 18px;
    }

    .login-box {
        width: 100%;
        padding: 24px;
    }
}

@media (max-width: 800px) {
    .navbar {
        position: static;
        flex-wrap: wrap;
    }

    .app-shell {
        display: block;
        padding-top: 0;
    }

    .sidebar {
        position: static;
        width: 100%;
        height: auto;
    }

    .sidebar-collapsed .sidebar {
        display: none;
        width: 100%;
    }

    .sidebar-collapsed .main-content {
        width: 100%;
        margin-left: 0;
    }

    .main-content {
        width: 100%;
        margin-left: 0;
        padding: 16px;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }
}
