* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: #f4efe7; color: #2f261f; }
a { color: inherit; }
.page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.card { width: 100%; max-width: 760px; background: #fff; border-radius: 24px; padding: 34px; box-shadow: 0 20px 60px rgba(47, 38, 31, 0.14); }
.small-card { max-width: 480px; }
.eyebrow { font-size: 13px; letter-spacing: 0.16em; font-weight: 700; color: #9b6a38; margin-bottom: 12px; }
h1 { margin: 0 0 12px; font-size: 34px; }
h2 { margin: 0 0 12px; font-size: 22px; }
.intro, .muted { margin: 0 0 24px; line-height: 1.55; color: #66584d; }
.muted { margin-top: 18px; font-size: 14px; }
.status { border-radius: 16px; padding: 14px 16px; display: grid; gap: 6px; border: 1px solid #ddd; margin-bottom: 14px; }
.status.ok { background: #edf8ef; border-color: #9bd3a7; color: #185c27; }
.status.error { background: #fff0f0; border-color: #e7a0a0; color: #8a1f1f; }
.status.warn { background: #fff8e8; border-color: #e9cc80; color: #735100; }
.status span { line-height: 1.45; word-break: break-word; }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 7px; font-weight: 700; color: #3c3027; }
.form input[type="text"], .form input[type="email"], .form input[type="password"] { width: 100%; border: 1px solid #ded0c2; border-radius: 14px; padding: 13px 14px; font-size: 15px; background: #fffdfb; }
.form input:focus { outline: 3px solid rgba(155, 106, 56, 0.18); border-color: #9b6a38; }
.check { display: flex !important; align-items: center; gap: 10px !important; }
.check input { width: 18px; height: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border: 0; border-radius: 14px; padding: 0 18px; background: #8f6234; color: #fff; font-weight: 700; text-decoration: none; cursor: pointer; font-size: 14px; }
.btn.secondary { background: #efe3d7; color: #3d2e21; }
.btn.danger { background: #a93636; }
.actions, .top-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar { background: #2f261f; color: #fff; padding: 26px 18px; }
.brand { font-size: 20px; font-weight: 800; margin-bottom: 28px; }
.sidebar nav { display: grid; gap: 8px; }
.sidebar a { color: #fff; text-decoration: none; padding: 12px 14px; border-radius: 14px; opacity: 0.78; }
.sidebar a.active, .sidebar a:hover { background: rgba(255,255,255,0.12); opacity: 1; }
.sidebar a.disabled { opacity: 0.35; cursor: not-allowed; }
.content { padding: 34px; }
.content.narrow { max-width: 900px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.topbar h1 { margin-bottom: 4px; }
.topbar p { margin: 0; color: #66584d; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-bottom: 20px; }
.metric, .panel { background: #fff; border-radius: 22px; padding: 22px; box-shadow: 0 12px 34px rgba(47,38,31,0.08); }
.metric span { color: #66584d; display: block; margin-bottom: 10px; }
.metric strong { font-size: 34px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 12px; border-bottom: 1px solid #eee2d7; white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: #7c6c5d; }
.pill { display: inline-flex; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 700; }
.ok-pill { background: #edf8ef; color: #185c27; }
.off-pill { background: #f2ece6; color: #7c6c5d; }
.row-actions a { color: #8f6234; font-weight: 700; text-decoration: none; }
@media (max-width: 780px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .content { padding: 22px; }
    .grid { grid-template-columns: 1fr; }
    .topbar { align-items: flex-start; flex-direction: column; }
}

/* v003 mobile-first verbeteringen */
.mobile-menu-title { display: none; }
.status.warn { background: #fff8e8; border-color: #e9cc80; color: #735100; }
@media (max-width: 780px) {
    body { background: #f7f1ea; }
    .page { padding: 14px; align-items: flex-start; }
    .card { border-radius: 20px; padding: 22px; margin-top: 18px; }
    h1 { font-size: 28px; line-height: 1.12; }
    .app-shell { display: block; min-height: 100vh; }
    .sidebar { padding: 16px; position: sticky; top: 0; z-index: 10; box-shadow: 0 8px 24px rgba(47,38,31,0.18); }
    .brand { margin-bottom: 12px; font-size: 18px; }
    .sidebar nav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
    .sidebar a { white-space: nowrap; padding: 10px 12px; border-radius: 12px; flex: 0 0 auto; }
    .content { padding: 18px 14px 28px; }
    .topbar { gap: 12px; margin-bottom: 16px; }
    .top-actions, .actions { width: 100%; }
    .top-actions .btn, .actions .btn, .form .btn { flex: 1 1 auto; width: 100%; }
    .metric, .panel { border-radius: 18px; padding: 18px; }
    .table-wrap { overflow: visible; }
    table, thead, tbody, th, td, tr { display: block; width: 100%; }
    thead { display: none; }
    tr { background: #fff; border: 1px solid #eee2d7; border-radius: 16px; padding: 12px; margin-bottom: 12px; box-shadow: 0 8px 22px rgba(47,38,31,0.06); }
    td { border-bottom: 0; padding: 7px 0; white-space: normal; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
    td::before { content: attr(data-label); color: #7c6c5d; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; flex: 0 0 42%; }
    .row-actions { justify-content: flex-end; }
    .row-actions::before { content: ''; display: none; }
    .row-actions a { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; background: #efe3d7; color: #3d2e21; border-radius: 12px; padding: 0 14px; width: 100%; }
}

.location-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px}.location-card{background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:20px;box-shadow:0 12px 30px rgba(15,23,42,.06)}.location-card h2{margin:0;font-size:20px}.location-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.muted{color:#64748b}.card-actions{margin-top:16px}.empty-state{text-align:center}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}textarea{width:100%;border:1px solid #d1d5db;border-radius:12px;padding:12px;font:inherit;resize:vertical}select{width:100%;border:1px solid #d1d5db;border-radius:12px;padding:12px;background:#fff;font:inherit}.form-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}@media(max-width:720px){.form-grid{grid-template-columns:1fr}.location-grid{grid-template-columns:1fr}.location-head{align-items:center}.card-actions .btn{width:100%;text-align:center}}

/* v005 professioneel locatiebeheer */
.workspace-card { background: #fff; border-radius: 28px; box-shadow: 0 18px 55px rgba(47,38,31,0.10); overflow: hidden; border: 1px solid rgba(143,98,52,0.12); }
.locations-workspace { display: grid; grid-template-columns: 360px minmax(0, 1fr); min-height: 560px; }
.locations-list-panel { background: #fbf7f1; border-right: 1px solid #eadfD2; padding: 22px; }
.location-editor-panel { padding: 26px; }
.panel-title-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.panel-title-row h2 { margin: 0; font-size: 21px; }
.panel-title-row p { margin: 5px 0 0; color: #77685c; line-height: 1.45; }
.count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 30px; border-radius: 999px; background: #efe3d7; color: #5a3c22; font-weight: 800; }
.location-list { display: grid; gap: 10px; }
.location-list-item { display: grid; gap: 6px; padding: 15px; border-radius: 18px; text-decoration: none; border: 1px solid transparent; background: rgba(255,255,255,0.72); transition: 0.15s ease; }
.location-list-item:hover, .location-list-item.active { background: #fff; border-color: #d9c5b1; box-shadow: 0 10px 24px rgba(47,38,31,0.08); transform: translateY(-1px); }
.location-list-name { font-weight: 800; font-size: 16px; color: #2f261f; }
.location-list-meta { display: inline-flex; align-items: center; gap: 7px; color: #6c5d50; font-size: 13px; font-weight: 700; }
.location-list-address { color: #7c6c5d; font-size: 13px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 99px; background: #9a8b7c; }
.status-active { background: #3c9f57; }
.status-rental { background: #2f80ed; }
.status-construction { background: #c07a1a; }
.status-inactive { background: #999; }
.platform-form { display: grid; gap: 18px; }
.platform-form .field { display: grid; gap: 8px; font-weight: 800; color: #3d3027; }
.platform-form input[type="text"], .platform-form select, .platform-form textarea { width: 100%; border: 1px solid #d9cbbd; border-radius: 16px; padding: 14px 15px; font: inherit; font-size: 15px; background: #fffdfb; color: #2f261f; box-shadow: 0 1px 0 rgba(47,38,31,0.03); }
.platform-form select { min-height: 51px; appearance: auto; }
.platform-form textarea { min-height: 190px; resize: vertical; line-height: 1.5; }
.platform-form input:focus, .platform-form select:focus, .platform-form textarea:focus { outline: 4px solid rgba(143,98,52,0.16); border-color: #8f6234; }
.modern-location-grid { grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; }
.btn.compact { min-height: 38px; padding: 0 14px; }
.split-actions { justify-content: space-between; align-items: center; margin-top: 4px; }
.left-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.delete-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid #eee2d7; }
.text-danger { border: 0; background: transparent; color: #a93636; font-weight: 800; cursor: pointer; padding: 0; }
.empty-mini { display: grid; gap: 7px; padding: 18px; background: #fff; border-radius: 18px; border: 1px dashed #d9c5b1; color: #77685c; }
.empty-mini strong { color: #2f261f; }
@media (max-width: 980px) {
    .locations-workspace { grid-template-columns: 1fr; }
    .locations-list-panel { border-right: 0; border-bottom: 1px solid #eadfd2; }
    .location-list { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}
@media (max-width: 720px) {
    .content.locations-page { padding: 14px 10px 28px; }
    .workspace-card { border-radius: 20px; }
    .locations-list-panel, .location-editor-panel { padding: 16px; }
    .location-list { grid-template-columns: 1fr; }
    .modern-location-grid { grid-template-columns: 1fr; }
    .editor-title { align-items: flex-start; }
    .platform-form input[type="text"], .platform-form select, .platform-form textarea { border-radius: 14px; font-size: 16px; }
    .left-actions, .left-actions .btn, .btn.compact { width: 100%; }
}

/* v006 locatie-detail met documenten */
.location-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 22px; padding-bottom: 14px; border-bottom: 1px solid #eee2d7; }
.location-tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 13px; border-radius: 999px; background: #f6eee5; color: #5b4635; text-decoration: none; font-weight: 800; font-size: 13px; }
.location-tabs a.active { background: #8f6234; color: #fff; }
.location-tabs a.disabled { opacity: .45; cursor: not-allowed; }
.location-tabs span { min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: rgba(255,255,255,.55); font-size: 12px; }
.location-section { margin-top: 10px; padding-top: 4px; }
.documents-section { margin-top: 28px; padding-top: 22px; border-top: 1px solid #eee2d7; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.section-heading h3 { margin: 0 0 5px; font-size: 19px; }
.section-heading p { margin: 0; color: #77685c; line-height: 1.45; }
.upload-card { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr) auto; gap: 12px; align-items: end; padding: 16px; border: 1px dashed #d6c2ad; border-radius: 20px; background: #fffaf5; margin-bottom: 16px; }
.upload-drop { display: grid; gap: 8px; font-weight: 800; color: #3d3027; }
.upload-drop input[type="file"] { width: 100%; border: 1px solid #d9cbbd; border-radius: 14px; padding: 11px; background: #fff; font-size: 14px; }
.upload-note { margin: 0; }
.documents-list { display: grid; gap: 10px; }
.document-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid #eee2d7; border-radius: 18px; background: #fffdfb; }
.doc-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: #f2e6d9; }
.doc-main { display: grid; gap: 4px; min-width: 0; }
.doc-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-main span { color: #77685c; font-size: 13px; }
.doc-main p { margin: 3px 0 0; color: #5d5046; line-height: 1.4; }
.doc-actions { display: flex; align-items: center; gap: 12px; }
.doc-actions form { margin: 0; }
@media (max-width: 860px) {
    .upload-card { grid-template-columns: 1fr; align-items: stretch; }
    .upload-card .btn { width: 100%; }
    .document-row { grid-template-columns: 40px minmax(0,1fr); align-items: start; }
    .doc-actions { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; padding-left: 54px; }
}
@media (max-width: 520px) {
    .location-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
    .location-tabs a { white-space: nowrap; flex: 0 0 auto; }
    .document-row { grid-template-columns: 1fr; }
    .doc-icon { display: none; }
    .doc-actions { padding-left: 0; display: grid; grid-template-columns: 1fr; }
    .doc-actions .btn { width: 100%; }
}
