/* Modal (sama seperti sebelumnya) */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--white);
    border-radius: 1rem;
    max-width: 450px;
    width: 90%;
}

.pin-modal-content {
    padding: 2.5rem;
    text-align: center;
}

.pin-header {
    margin-bottom: 2rem;
}

.pin-header .logo-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.pin-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.pin-header p {
    color: var(--text-light);
    font-size: 0.875rem;
}

.pin-display {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #E5E7EB;
    transition: all 0.2s;
}

.pin-dot.filled {
    background: var(--primary);
    transform: scale(1.2);
}

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.key-btn {
    padding: 1.25rem;
    font-size: 1.5rem;
    font-weight: 600;
    background: #F3F4F6;
    border: 2px solid transparent;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.key-btn:hover {
    background: var(--secondary);
    border-color: var(--primary);
}

.key-btn:active {
    transform: scale(0.95);
}

.key-clear {
    background: #FEE2E2;
    color: var(--danger);
    font-size: 1.25rem;
}

.key-submit {
    background: var(--primary);
    color: var(--white);
    font-size: 1rem;
}

.pin-footer {
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #F9FAFB;
}

/* Sidebar */
.admin-sidebar {
    width: 220px;
    background: #FEF3C7;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #E5E7EB;
}

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.375rem;
}

.brand-icon {
    font-size: 1.25rem;
}

.brand-text {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

.sidebar-subtitle {
    font-size: 0.75rem;
    color: var(--text-light);
    padding-left: 2rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.875rem;
    margin: 0.125rem 0.5rem;
    border-radius: 0.5rem;
}

.nav-item:hover {
    background: rgba(217, 119, 6, 0.1);
}

.nav-item.active {
    background: var(--primary);
    color: var(--white);
}

.nav-icon {
    font-size: 1.125rem;
}

.sidebar-footer {
    padding: 1rem 0;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.nav-logout {
    color: var(--danger);
}

/* Main Content */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.main-header {
    background: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    font-size: 1.5rem;
}

.brand-name {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.125rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-search {
    background: #F9FAFB;
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
    cursor: pointer;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #F9FAFB;
    border-radius: 0.5rem;
}

.user-icon {
    font-size: 1.125rem;
}

/* Content Views */
.content-view {
    display: none;
    padding: 2rem;
}

.content-view.active {
    display: block;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.content-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
}

.content-header p {
    font-size: 0.875rem;
    color: var(--text-light);
}

.header-stats {
    display: flex;
    gap: 0.75rem;
}

.stat-pill {
    background: #FEF3C7;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.stat-icon {
    font-size: 1rem;
}

/* Table Card */
.table-card {
    background: var(--white);
    border-radius: 0.875rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}

.table-card-header {
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.title-icon {
    font-size: 1.5rem;
}

.table-title h2 {
    font-size: 1.125rem;
    font-weight: 600;
}

.btn-export {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.export-icon {
    font-size: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #F9FAFB;
}

.data-table th {
    text-align: left;
    padding: 1rem 1.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    padding: 1.25rem 1.75rem;
    border-top: 1px solid var(--border);
}

.data-table tbody tr:hover {
    background: #FAFAFA;
}

.employee-cell {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.employee-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.125rem;
}

.employee-avatar.avatar-yellow { background: #F59E0B; }
.employee-avatar.avatar-gray { background: #6B7280; }

.employee-info h4 {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.125rem;
}

.employee-info p {
    font-size: 0.75rem;
    color: var(--text-light);
}

.password-cell {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.password-hidden {
    color: var(--text-light);
    font-family: monospace;
}

.btn-show-password {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.6;
}

.btn-show-password:hover {
    opacity: 1;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-reset, .btn-delete {
    padding: 0.5rem 0.875rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-reset {
    background: #FEF3C7;
    color: #92400E;
}

.btn-delete {
    background: #FEE2E2;
    color: var(--danger);
}

.table-footer {
    padding: 1rem 2rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Form Cards */
.form-cards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-card {
    background: var(--white);
    border-radius: 0.875rem;
    padding: 1.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.form-card-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 1.5rem;
}

.card-icon {
    font-size: 2rem;
}

.form-card-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group select {
    cursor: pointer;
    background-color: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-submit {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.875rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
}

.btn-submit:hover {
    background: var(--primary-dark);
}

/* Responsive */
@media (max-width: 1024px) {
    .form-cards-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        display: none; /* Hide sidebar on mobile, add hamburger menu later */
    }
    
    .main-header {
        flex-direction: column;
        gap: 1rem;
    }
}