/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: #f0f0f7; color: #2d2d5e; }
a { text-decoration: none; color: inherit; }

/* ---- Topbar ---- */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    background: #fff; height: 56px; padding: 0 24px;
    border-bottom: 1px solid #e5e5f0; position: sticky; top: 0; z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; gap: 8px; }
.logo-title { font-weight: 700; font-size: 15px; color: #2d2d5e; letter-spacing: .5px; }
.topbar-subtitle { font-size: 12px; color: #9999bb; font-weight: 500; letter-spacing: 1px; border-left: 1px solid #e5e5f0; padding-left: 16px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.user-name { font-size: 14px; color: #2d2d5e; }
.badge-role { background: #2d2d5e; color: #fff; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }
.btn-logout { display: flex; align-items: center; gap: 6px; border: 1px solid #ddd; padding: 6px 14px; border-radius: 8px; font-size: 13px; color: #2d2d5e; cursor: pointer; }
.btn-logout:hover { background: #f5f5fa; }

/* ---- App Layout ---- */
.app-layout { display: flex; min-height: calc(100vh - 56px); }

/* ---- Sidebar ---- */
.sidebar { width: 190px; background: #f5f5fb; padding: 20px 12px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid #e5e5f0; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; color: #555577; font-weight: 500; transition: background .15s; }
.nav-item:hover { background: #ebebf8; }
.nav-item.active { background: #7c6ef7; color: #fff; }
.nav-item.active svg { stroke: #fff; }

/* ---- Main Content ---- */
.main-content { flex: 1; padding: 36px 40px; }

/* ---- Page Header ---- */
.page-label { font-size: 11px; letter-spacing: 1.5px; font-weight: 600; color: #8888aa; text-transform: uppercase; }
.page-title { font-size: 30px; font-weight: 800; color: #1a1a3e; margin-top: 4px; margin-bottom: 24px; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }

/* ---- Breadcrumb ---- */
.breadcrumb { font-size: 13px; color: #8888aa; margin-bottom: 8px; }
.breadcrumb a { color: #7c6ef7; }
.breadcrumb span { margin: 0 6px; }

/* ---- Cards / Customer List ---- */
.card { background: #fff; border-radius: 14px; padding: 20px 24px; margin-bottom: 16px; display: flex; align-items: center; gap: 16px; cursor: pointer; transition: box-shadow .15s; }
.card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.card-icon { width: 40px; height: 40px; background: #ebebf8; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.card-link { display: flex; align-items: center; flex: 1; text-decoration: none; color: inherit; gap: 16px; }
.card-info strong { font-size: 15px; font-weight: 700; color: #1a1a3e; }
.card-info p { font-size: 13px; color: #8888aa; margin-top: 2px; }

/* ---- Buttons ---- */
.btn-primary { background: #b8f018; color: #1a1a3e; font-weight: 700; padding: 10px 20px; border-radius: 10px; border: none; cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.btn-primary:hover { background: #a5d815; }
.btn-danger { background: none; border: none; cursor: pointer; color: #aaa; padding: 4px; display: inline-flex; align-items: center; }
.btn-danger:hover { color: #e55; }
.btn-icon { background: none; border: none; cursor: pointer; color: #aaa; padding: 4px; display: inline-flex; align-items: center; }
.btn-icon:hover { color: #7c6ef7; }

/* ---- Section ---- */
.section { background: #fff; border-radius: 14px; margin-bottom: 28px; overflow: hidden; }
.section-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; }
.section-title { font-size: 17px; font-weight: 700; color: #1a1a3e; display: flex; align-items: center; gap: 10px; }
.section-count { font-size: 13px; font-weight: 500; color: #8888aa; }

/* ---- Table ---- */
table { width: 100%; border-collapse: collapse; }
thead th { font-size: 11px; font-weight: 600; color: #9999bb; letter-spacing: 1px; text-transform: uppercase; padding: 10px 24px; border-bottom: 1px solid #f0f0f7; text-align: left; }
tbody td { padding: 14px 24px; font-size: 14px; color: #2d2d5e; border-bottom: 1px solid #f5f5fb; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafaff; }

/* ---- Login ---- */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #f0f0f7; }
.login-card { background: #fff; padding: 44px 40px; border-radius: 18px; width: 420px; box-shadow: 0 4px 30px rgba(0,0,0,.07); }
.login-logo { display: flex; flex-direction: column; align-items: center; margin-bottom: 32px; gap: 4px; }
.login-logo-title { font-size: 20px; font-weight: 800; color: #2d2d5e; letter-spacing: 1px; }
.login-logo-sub { font-size: 11px; letter-spacing: 2px; color: #9999bb; font-weight: 600; }
.login-label { font-size: 10px; letter-spacing: 2px; font-weight: 700; color: #9999bb; text-transform: uppercase; margin-bottom: 6px; }
.login-title { font-size: 26px; font-weight: 800; color: #1a1a3e; margin-bottom: 28px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: #2d2d5e; }
.form-group input { width: 100%; padding: 12px 16px; border: 1px solid #ddd; border-radius: 10px; font-size: 14px; outline: none; transition: border .15s; }
.form-group input:focus { border-color: #7c6ef7; }
.btn-login { width: 100%; background: #b8f018; color: #1a1a3e; font-weight: 700; font-size: 15px; padding: 14px; border-radius: 12px; border: none; cursor: pointer; margin-top: 8px; }
.btn-login:hover { background: #a5d815; }
.login-hint { text-align: center; font-size: 12px; color: #aaa; margin-top: 20px; }
.alert-error { background: #ffeaea; color: #c00; border-radius: 8px; padding: 10px 16px; margin-bottom: 16px; font-size: 13px; }

/* ---- Location detail ---- */
.location-address { font-size: 14px; color: #8888aa; margin-bottom: 28px; }

/* ---- Modal ---- */
.modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 200; align-items: center; justify-content: center; }
.modal-backdrop.open { display: flex; }
.modal { background: #fff; border-radius: 16px; padding: 32px; width: 420px; }
.modal h3 { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.modal .form-group input { width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.btn-secondary { background: #f0f0f7; color: #2d2d5e; border: none; padding: 10px 20px; border-radius: 8px; font-size: 14px; cursor: pointer; font-weight: 600; }

/* ---- Import ---- */
.import-box { background: #fff; border-radius: 14px; padding: 32px; }
.import-box h2 { font-size: 18px; font-weight: 700; margin-bottom: 16px; }

.import-dropzone {
    background: #fff; border: 2px dashed #c8c8e8; border-radius: 16px;
    padding: 48px 24px; text-align: center; cursor: pointer; transition: border-color .2s, background .2s;
}
.import-dropzone:hover, .import-dropzone.drag-over { border-color: #7c6ef7; background: #f8f7ff; }
.drop-icon { width: 60px; height: 60px; background: #ebebf8; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.drop-title { font-size: 16px; font-weight: 700; color: #1a1a3e; margin-bottom: 4px; }
.drop-sub { font-size: 13px; color: #9999bb; }

/* ---- Log Badges ---- */
.log-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 6px; }
.log-badge--system { background: #ebe9ff; color: #5b4ecf; }
.log-badge--import { background: #e0f0ff; color: #1a6ab5; }
.log-badge--employee { background: #e8f8e0; color: #2a7a00; }
.log-badge--department { background: #fff3e0; color: #b36200; }
.log-badge--location { background: #fce8f0; color: #a0004a; }
.log-badge--customer { background: #e0f8f8; color: #006060; }
.log-badge--default { background: #f0f0f7; color: #555577; }

/* ---- Alerts ---- */
.alert-success { background: #e8f8e0; color: #2a7a00; border-radius: 8px; padding: 10px 16px; margin-bottom: 16px; font-size: 13px; }
