/**
 * StringMate - Mobiel dashboard CSS
 * Geoptimaliseerd voor iPhone homescreen
 */

/* Reset WordPress rommel op deze pagina */
#smm-app * { box-sizing: border-box; }

#smm-app {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    padding-bottom: 40px;
    color: #1a1a2e;
    max-width: 480px;
    margin: 0 auto;
}

/* Header */
.smm-header {
    background: #1a5c2a;
    color: #fff;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    min-height: 58px;
}
.smm-header-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}
.smm-logo {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.smm-header-logo {
    height: 36px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}
.smm-admin-link {
    color: #a8d5b5;
    font-size: 13px;
    text-decoration: none;
    font-weight: 600;
}

/* Tabs */
.smm-tabs {
    display: flex;
    background: #fff;
    border-bottom: 2px solid #e9ecef;
    position: sticky;
    top: 53px;
    z-index: 99;
}
.smm-tab {
    flex: 1;
    text-align: center;
    padding: 13px 8px;
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.smm-tab.actief { color: #1a5c2a; border-bottom-color: #1a5c2a; }
.smm-tab-nieuw.actief  { border-bottom-color: #3498db; color: #3498db; }
.smm-tab-bezig.actief  { border-bottom-color: #f39c12; color: #f39c12; }
.smm-tab-klaar.actief  { border-bottom-color: #27ae60; color: #27ae60; }
.smm-badge {
    background: #dc3545;
    color: #fff;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
}

/* Lijst */
.smm-lijst {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Leeg state */
.smm-leeg {
    text-align: center;
    padding: 60px 20px;
    color: #adb5bd;
}
.smm-leeg span { font-size: 48px; display: block; margin-bottom: 12px; }
.smm-leeg p { font-size: 16px; }

/* Kaart */
.smm-kaart {
    background: #ffffff !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12) !important;
    overflow: hidden !important;
    border: 1px solid #e9ecef !important;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.smm-kaart.smm-weg {
    transform: translateX(100%);
    opacity: 0;
}

.smm-kaart-top {
    padding: 14px 16px 10px;
    border-bottom: 1px solid #f0f2f5;
}
.smm-kaart-hoofd {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.smm-klant-naam {
    font-size: 17px;
    font-weight: 700;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.smm-spoed {
    font-size: 16px;
}
.smm-kaart-sub {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #6c757d;
}
.smm-nr { font-family: monospace; font-size: 11px; }

/* Info rijen */
.smm-kaart-info {
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.smm-info-rij {
    display: flex;
    gap: 10px;
    font-size: 14px;
    align-items: baseline;
    overflow: hidden;
}
.smm-info-rij > span:last-child {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.smm-info-label {
    color: #adb5bd;
    font-size: 12px;
    min-width: 46px;
    flex-shrink: 0;
}
.smm-toelichting {
    background: #fff8e1;
    border-radius: 6px;
    padding: 6px 8px;
    margin-top: 2px;
}

/* Datum kleuren */
.smm-datum-laat    { color: #dc3545; font-weight: 700; }
.smm-datum-urgent  { color: #fd7e14; font-weight: 700; }
.smm-datum-binnenkort { color: #f39c12; }

/* Betaald */
.smm-betaald { color: #27ae60; font-weight: 700; font-size: 12px; }
.smm-wachten { font-size: 13px; }

/* Actieknoppen */
.smm-acties {
    padding: 10px 12px 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.smm-knop {
    flex: 1;
    min-height: 46px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
    padding: 0 12px;
    min-width: 80px;
}
.smm-knop:active { transform: scale(0.96); }
.smm-knop:disabled { opacity: 0.5; }
.smm-knop.smm-laden::after { content: '…'; }

.smm-knop-bezig    { background: #3498db; color: #fff; }
.smm-knop-klaar    { background: #27ae60; color: #fff; }
.smm-knop-betaald  { background: #8e44ad; color: #fff; }
.smm-knop-opgehaald{ background: #95a5a6; color: #fff; }
.smm-knop-overleg  { background: #fff3cd; color: #856404; border: 1px solid #ffc107; }
.smm-knop-grijs    { background: #e9ecef; color: #495057; }
.smm-knop-overleg-ok { background: #dc3545; color: #fff; flex: 2; }

/* Modal */
.smm-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    padding: 0;
}
.smm-modal.smm-verborgen { display: none; }
.smm-modal-inhoud {
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 24px 20px 40px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}
.smm-modal-inhoud h3 {
    font-size: 18px;
    margin: 0 0 16px;
}
.smm-modal-inhoud textarea {
    width: 100%;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 12px;
    font-size: 15px;
    font-family: inherit;
    resize: none;
    margin-bottom: 14px;
}
.smm-modal-inhoud textarea:focus {
    outline: none;
    border-color: #1a5c2a;
}
.smm-modal-knoppen {
    display: flex;
    gap: 8px;
}

/* Toast feedback */
.smm-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a5c2a;
    color: #fff;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    z-index: 2000;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transition: opacity 0.3s;
}
.smm-toast.smm-verborgen { display: none; }
.smm-toast.smm-toast-fout { background: #dc3545; }

/* Login */
.smm-login {
    text-align: center;
    padding: 60px 20px;
}
.smm-login-knop {
    display: inline-block;
    background: #1a5c2a;
    color: #fff;
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    margin-top: 16px;
}

/* WordPress admin bar verbergen op deze pagina */
body.smm-pagina #wpadminbar { display: none !important; }
body.smm-pagina #wpwrap { margin-top: 0 !important; }
body.smm-pagina .site-header,
body.smm-pagina .site-footer,
body.smm-pagina header,
body.smm-pagina footer { display: none !important; }
body.smm-pagina #smm-app { max-width: 100%; }

/* Verberg WordPress paginatitel boven het mobiele dashboard */
.smm-hide-title .entry-title,
.smm-hide-title .page-title,
.smm-hide-title h1.title {
    display: none !important;
}
#smm-app {
    margin-top: -20px;
}

/* Paginering */
.smm-paginering {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 24px;
    gap: 12px;
}
.smm-pag-knop {
    background: #1a5c2a;
    color: white;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}
.smm-pag-info {
    color: #6c757d;
    font-size: 14px;
    font-weight: 600;
}
