/* ========================================
   NotarisCore - Notarissen Portal Stylesheet
   Gebaseerd op webmaster.css, aangepast voor
   toegankelijkheid en eenvoud
   ======================================== */

/* Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    color: #333;
    background: #f0f2f5;
    line-height: 1.6;
}

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

hr { border: none; border-top: 1px solid #e2e8f0; margin: 20px 0; }

/* ========================================
   Width & Layout Classes
   ======================================== */
.w10 { width: 10% !important; }
.w15 { width: 15% !important; }
.w20 { width: 20% !important; }
.w25 { width: 25% !important; }
.w30 { width: 30% !important; }
.w33 { width: 33% !important; }
.w40 { width: 40% !important; }
.w50 { width: 50% !important; }
.w60 { width: 60% !important; }
.w70 { width: 70% !important; }
.w80 { width: 80% !important; }
.w100 { width: 100% !important; }

.left { float: left !important; }
.right { float: right !important; }
.center { position: relative; margin: 0 auto; }
.clearfix::after { content: ""; display: table; clear: both; }
.hideMe { display: none !important; }
.textCenter { text-align: center; }
.textRight { text-align: right; }
.textLeft { text-align: left; }

.mt5 { margin-top: 5px; }
.mt10 { margin-top: 10px; }
.mt15 { margin-top: 15px; }
.mt20 { margin-top: 20px; }
.mt30 { margin-top: 30px; }
.mb5 { margin-bottom: 5px; }
.mb10 { margin-bottom: 10px; }
.mb15 { margin-bottom: 15px; }
.mb20 { margin-bottom: 20px; }
.ml10 { margin-left: 10px; }
.mr10 { margin-right: 10px; }
.p10 { padding: 10px; }
.p15 { padding: 15px; }
.p20 { padding: 20px; }

/* ========================================
   App Shell - Sidebar Layout
   ======================================== */
.appShell {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #1e293b;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
}

.sidebar .logo {
    padding: 22px 24px;
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar .logo .logoIcon {
    width: 36px;
    height: 36px;
    background: #3b82f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar .logo .logoText {
    font-size: 17px;
    font-weight: 600;
    color: #f8fafc;
}

.sidebar .logo .logoSub {
    font-size: 11px;
    color: #64748b;
    display: block;
    margin-top: 1px;
}

.sidebar nav {
    padding: 16px 0;
    flex: 1;
}

.sidebar nav .navGroup {
    margin-bottom: 8px;
}

.sidebar nav .navGroupLabel {
    padding: 10px 24px 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    font-weight: 600;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.15s;
    font-size: 15px;
    border-left: 3px solid transparent;
}

.sidebar nav a:hover {
    background: #334155;
    color: #e2e8f0;
    text-decoration: none;
}

.sidebar nav a.active {
    background: #334155;
    color: #ffffff;
    border-left-color: #3b82f6;
}

svg.navIcon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.sidebar nav a .navBadge {
    margin-left: auto;
    background: #3b82f6;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.sidebarFooter {
    padding: 18px 24px;
    border-top: 1px solid #334155;
}

.sidebarFooter a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
    font-size: 14px;
    text-decoration: none;
    padding: 8px 0;
}

.sidebarFooter a:hover {
    color: #e2e8f0;
    text-decoration: none;
}

/* Hamburger (mobile) */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #64748b;
}

/* User Menu */
.userMenu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.userAvatar {
    width: 36px;
    height: 36px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 600;
}

.userNameLabel {
    font-size: 14px;
    color: #64748b;
}

/* Main Content */
.mainContent {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.topBar {
    background: white;
    padding: 0 30px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topBar .pageTitle {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.topBar .topBarRight {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Page Body */
.pageBody {
    padding: 30px;
    flex: 1;
}

/* ========================================
   Grid System (Moneywise Pattern)
   ======================================== */
.gridWrap {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 24px;
    overflow: hidden;
}

.gridHeader {
    padding: 18px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gridHeader span {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.gridBody {
    padding: 24px;
}

.gridBody.noPadding {
    padding: 0;
}

.gridFooter {
    padding: 14px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 14px;
    color: #64748b;
}

.gridActions {
    padding: 18px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ========================================
   Grid Result Rows
   ======================================== */
.gridResultHeader {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gridResultHeader .col {
    padding-right: 12px;
}

.gridResult {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s;
    cursor: pointer;
}

.gridResult:last-child {
    border-bottom: none;
}

.gridResult:hover {
    background: #f8fafc;
}

.gridResult .col {
    padding-right: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================
   Buttons - grotere touch targets (44px min)
   ======================================== */
.bttn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
    user-select: none;
    text-decoration: none;
    white-space: nowrap;
    min-height: 44px;
}

.bttn:hover { text-decoration: none; }

.bttn.primary {
    background: #3b82f6;
    color: white;
    border-color: #2563eb;
}
.bttn.primary:hover { background: #2563eb; }

.bttn.secondary {
    background: white;
    color: #374151;
    border-color: #d1d5db;
}
.bttn.secondary:hover { background: #f9fafb; }

.bttn.success {
    background: #10b981;
    color: white;
    border-color: #059669;
}
.bttn.success:hover { background: #059669; }

.bttn.danger {
    background: #ef4444;
    color: white;
    border-color: #dc2626;
}
.bttn.danger:hover { background: #dc2626; }

.bttn.warning {
    background: #f59e0b;
    color: white;
    border-color: #d97706;
}
.bttn.warning:hover { background: #d97706; }

.bttn.small {
    padding: 6px 14px;
    font-size: 13px;
    min-height: 36px;
}

.bttn:disabled, .bttn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bttn:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

.bttnLink {
    background: none;
    border: none;
    color: #2563eb;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 6px;
}
.bttnLink:hover { text-decoration: underline; }

/* ========================================
   Form Elements - grotere inputs
   ======================================== */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="datetime-local"],
input[type="tel"],
input[type="url"],
textarea,
select {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #1e293b;
    background: white;
    transition: border-color 0.15s;
    outline: none;
    min-height: 44px;
}

input:focus, textarea:focus, select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

select {
    cursor: pointer;
}

.formGroup {
    margin-bottom: 18px;
}

.formGroup label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.formGroup .formHint {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 4px;
}

.formRow {
    display: flex;
    gap: 18px;
    margin-bottom: 18px;
}

.formRow .formGroup {
    flex: 1;
    margin-bottom: 0;
}

/* ========================================
   Badges
   ======================================== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.badgeGreen { background: #dcfce7; color: #166534; }
.badgeBlue { background: #dbeafe; color: #1e40af; }
.badgeRed { background: #fee2e2; color: #991b1b; }
.badgeYellow { background: #fef3c7; color: #92400e; }
.badgeGray { background: #f1f5f9; color: #475569; }
.badgeOrange { background: #ffedd5; color: #9a3412; }

/* ========================================
   Data Table
   ======================================== */
.dataTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.dataTable thead th {
    background: #f8fafc;
    padding: 12px 18px;
    text-align: left;
    font-weight: 600;
    color: #64748b;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid #e2e8f0;
}

.dataTable tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
}

.dataTable tbody tr:hover {
    background: #f8fafc;
}

.dataTable tbody tr.clickable {
    cursor: pointer;
}

/* ========================================
   Modal Popups
   ======================================== */
.modalOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modalContent {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 500px;
    padding: 28px;
    max-height: 90vh;
    overflow-y: auto;
}

.modalContent.wide {
    max-width: 700px;
}

.modalContent h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
}

/* ========================================
   Dashboard Cards
   ======================================== */
.dashCards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.dashCard {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 24px;
    transition: box-shadow 0.15s;
}

.dashCard:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dashCardHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dashCardTitle {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashCardIcon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashCardIcon.blue { background: #dbeafe; color: #2563eb; }
.dashCardIcon.green { background: #dcfce7; color: #16a34a; }
.dashCardIcon.orange { background: #ffedd5; color: #ea580c; }
.dashCardIcon.purple { background: #ede9fe; color: #7c3aed; }

.dashCardValue {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.dashCardSub {
    font-size: 14px;
    color: #94a3b8;
    margin-top: 4px;
}

/* ========================================
   Section Headers
   ======================================== */
.sectionTitle {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

/* ========================================
   Detail List (dl/dt/dd)
   ======================================== */
.detailList {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 6px 16px;
    font-size: 15px;
}

.detailList dt {
    color: #94a3b8;
    font-weight: 400;
}

.detailList dd {
    margin: 0;
    color: #1e293b;
}

/* ========================================
   Toggle Switch
   ======================================== */
.toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    cursor: pointer;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggleSlider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 26px;
    transition: background 0.2s;
}

.toggleSlider::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.toggle input:checked + .toggleSlider {
    background: #3b82f6;
}

.toggle input:checked + .toggleSlider::before {
    transform: translateX(22px);
}

.toggle input:focus-visible + .toggleSlider {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

/* ========================================
   Star Rating
   ======================================== */
.stars {
    display: inline-flex;
    gap: 2px;
    color: #fbbf24;
    font-size: 18px;
}

.stars .starEmpty {
    color: #e2e8f0;
}

/* ========================================
   Empty State
   ======================================== */
.emptyState {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.emptyState .emptyIcon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.emptyState p {
    font-size: 16px;
    max-width: 400px;
    margin: 0 auto;
}

/* ========================================
   Login Page
   ======================================== */
.loginPage {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f5;
    padding: 20px;
}

.loginBox {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    text-align: center;
}

.loginBox .loginLogo {
    width: 56px;
    height: 56px;
    background: #3b82f6;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
    margin: 0 auto 20px;
}

.loginBox h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.loginBox .loginSub {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 32px;
}

.loginBox .formGroup {
    text-align: left;
}

.loginBox .bttn {
    width: 100%;
}

.loginSuccess {
    color: #16a34a;
    font-size: 15px;
    line-height: 1.6;
}

.loginError {
    color: #dc2626;
    font-size: 14px;
    margin-top: 12px;
}

/* ========================================
   Faciliteiten Grid
   ======================================== */
.facGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.facItem {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.15s;
}

.facItem.active {
    background: #f0fdf4;
    border-color: #86efac;
}

.facItem .facNaam {
    flex: 1;
    font-size: 14px;
    color: #1e293b;
}

/* ========================================
   Diensten
   ======================================== */
.dienstSubGroep {
    border-bottom: 1px solid #e2e8f0;
}

.dienstSubGroep:last-child {
    border-bottom: none;
}

.dienstSubGroepHeader {
    padding: 10px 24px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

.dienstRow {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.dienstRow:last-child {
    border-bottom: none;
}

.dienstNaam {
    flex: 1;
    font-size: 15px;
    color: #1e293b;
}

.dienstTarief {
    width: 140px;
}

.dienstTarief input {
    width: 100%;
}

/* ========================================
   Review Card
   ======================================== */
.reviewCard {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}

.reviewCardHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.reviewCardNaam {
    font-weight: 600;
    color: #1e293b;
    font-size: 15px;
}

.reviewCardDatum {
    font-size: 13px;
    color: #94a3b8;
}

.reviewCardTekst {
    font-size: 15px;
    color: #475569;
    line-height: 1.6;
    margin-top: 8px;
}

.reviewCardAntwoord {
    margin-top: 14px;
    padding: 14px;
    background: white;
    border-radius: 8px;
    border-left: 3px solid #3b82f6;
}

.reviewCardAntwoord .antwoordLabel {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

/* ========================================
   Spinner (netproxy)
   ======================================== */
#netproxyspinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #3b82f6;
    z-index: 9999;
    animation: npProgress 2s ease-in-out infinite;
}

@keyframes npProgress {
    0% { width: 0; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        width: 280px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mainContent {
        margin-left: 0;
    }

    .hamburger {
        display: block;
    }

    .topBar {
        padding: 0 16px;
    }

    .pageBody {
        padding: 16px;
    }

    .dashCards {
        grid-template-columns: 1fr;
    }

    .formRow {
        flex-direction: column;
        gap: 0;
    }

    .facGrid {
        grid-template-columns: 1fr;
    }

    .dienstRow {
        flex-wrap: wrap;
    }

    .dienstTarief {
        width: 100%;
    }
}

/* Focus visible voor keyboard navigatie */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}
