/* Mobiele omgeving storingsdienst. Alle selectors zijn geprefixt met .m- zodat de
   desktopstyling (app.css / rdw-theme.css) ongewijzigd blijft. */

.m-shell {
    --m-bg: #f4f6fb;
    --m-surface: #ffffff;
    --m-border: #e2e8f0;
    --m-text: #0f172a;
    --m-muted: #64748b;
    --m-primary: #1b2e73;
    --m-primary-soft: #eef2ff;
    --m-danger: #b91c1c;
    --m-danger-soft: #fef2f2;
    --m-success: #15803d;
    --m-success-soft: #f0fdf4;
    --m-warning: #b45309;
    --m-warning-soft: #fffbeb;
    --m-nav-height: 64px;
    --m-header-height: 56px;

    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    background: var(--m-bg);
    color: var(--m-text);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

.m-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: var(--m-header-height);
    padding: .5rem 1rem;
    background: var(--m-primary);
    color: #fff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .18);
}

.m-header-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.2;
}

.m-header-sub {
    display: block;
    font-size: .75rem;
    font-weight: 400;
    opacity: .8;
}

.m-header-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    padding: 0 .85rem;
}

.m-main {
    flex: 1 1 auto;
    padding: 1rem 1rem calc(var(--m-nav-height) + 1.5rem);
}

.m-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--m-surface);
    border-top: 1px solid var(--m-border);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 12px rgba(15, 23, 42, .08);
}

.m-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    min-height: var(--m-nav-height);
    padding: .35rem;
    font-size: .7rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--m-muted);
    background: none;
    border: 0;
}

.m-nav-item .m-nav-icon {
    width: 1.35rem;
    height: 1.35rem;
    font-size: 1.25rem;
    line-height: 1;
    object-fit: contain;
}

.m-tegel-icoon {
    display: block;
    width: 1.8rem;
    height: 1.8rem;
    margin-bottom: .2rem;
    color: var(--m-primary);
    object-fit: contain;
}

.m-nav-item.active {
    color: var(--m-primary);
    background: var(--m-primary-soft);
}

.m-nav-badge {
    position: absolute;
    transform: translate(14px, -14px);
    min-width: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--m-danger);
    color: #fff;
    font-size: .65rem;
    line-height: 18px;
    text-align: center;
}

.m-section-title {
    margin: 1.25rem 0 .5rem;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--m-muted);
}

.m-section-title:first-child {
    margin-top: 0;
}

.m-card {
    display: block;
    width: 100%;
    text-align: left;
    background: var(--m-surface);
    border: 1px solid var(--m-border);
    border-left: 4px solid var(--m-border);
    border-radius: 14px;
    padding: .9rem 1rem;
    margin-bottom: .65rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}

.m-card-vandaag {
    border-color: var(--m-primary);
    background: var(--m-primary-soft);
}

.m-card--weekdag { border-left-color: #2563eb; }
.m-card--zaterdag { border-left-color: #d97706; }
.m-card--zondag { border-left-color: #be123c; }

.m-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

.m-card-datum {
    font-size: 1rem;
    font-weight: 700;
}

.m-card-meta {
    margin-top: .2rem;
    font-size: .8rem;
    color: var(--m-muted);
}

.m-card-acties {
    display: flex;
    gap: .5rem;
    margin-top: .85rem;
}

.m-badge {
    display: inline-block;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    white-space: nowrap;
    background: #f1f5f9;
    color: var(--m-muted);
}

.m-badge--open { background: var(--m-warning-soft); color: var(--m-warning); }
.m-badge--ok { background: var(--m-success-soft); color: var(--m-success); }
.m-badge--fout { background: var(--m-danger-soft); color: var(--m-danger); }
.m-badge--info { background: var(--m-primary-soft); color: var(--m-primary); }

.m-btn {
    flex: 1 1 0;
    min-height: 48px;
    border: 1px solid var(--m-border);
    border-radius: 12px;
    background: var(--m-surface);
    color: var(--m-text);
    font-size: .95rem;
    font-weight: 600;
    padding: 0 1rem;
}

.m-btn:disabled {
    opacity: .55;
}

.m-btn--primair {
    background: var(--m-primary);
    border-color: var(--m-primary);
    color: #fff;
}

.m-btn--ok {
    background: var(--m-success);
    border-color: var(--m-success);
    color: #fff;
}

.m-btn--fout {
    background: var(--m-danger);
    border-color: var(--m-danger);
    color: #fff;
}

.m-btn--blok {
    width: 100%;
    margin-top: .5rem;
}

.m-form {
    background: var(--m-surface);
    border: 1px solid var(--m-border);
    border-radius: 14px;
    padding: 1rem;
}

.m-veld {
    margin-bottom: .85rem;
}

.m-veld label {
    display: block;
    margin-bottom: .3rem;
    font-size: .8rem;
    font-weight: 600;
    color: var(--m-muted);
}

.m-veld input,
.m-veld select,
.m-veld textarea {
    width: 100%;
    min-height: 48px;
    padding: .6rem .75rem;
    font-size: 1rem;
    border: 1px solid var(--m-border);
    border-radius: 12px;
    background: #fff;
    color: var(--m-text);
}

.m-veld textarea {
    min-height: 90px;
}

.m-melding {
    padding: .75rem 1rem;
    border-radius: 12px;
    font-size: .9rem;
    margin-bottom: .75rem;
}

.m-melding--fout { background: var(--m-danger-soft); color: var(--m-danger); }
.m-melding--ok { background: var(--m-success-soft); color: var(--m-success); }

.m-leeg {
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--m-muted);
    background: var(--m-surface);
    border: 1px dashed var(--m-border);
    border-radius: 14px;
}

.m-tabs {
    display: flex;
    gap: .4rem;
    margin-bottom: .9rem;
}

.m-tab {
    flex: 1 1 0;
    min-height: 44px;
    border: 1px solid var(--m-border);
    border-radius: 999px;
    background: var(--m-surface);
    color: var(--m-muted);
    font-size: .85rem;
    font-weight: 600;
}

.m-tab.is-actief {
    background: var(--m-primary);
    border-color: var(--m-primary);
    color: #fff;
}

.m-tegels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .65rem;
}

.m-tegel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 96px;
    padding: .9rem;
    border: 1px solid var(--m-border);
    border-radius: 14px;
    background: var(--m-surface);
    color: var(--m-text);
    text-decoration: none;
    font-weight: 600;
}

.m-tegel-waarde {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--m-primary);
}
