/* ── Sales Meeting Tracker Pro ─────────────────────────────── */

#smt-root *{box-sizing:border-box;margin:0;padding:0;}
#smt-root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px;color:#1a1a2e;line-height:1.5;}

/* Spinner */
.smt-spinner{width:36px;height:36px;border:3px solid #e0e0e0;border-top-color:#2563eb;border-radius:50%;animation:smt-spin .7s linear infinite;margin:0 auto;}
@keyframes smt-spin{to{transform:rotate(360deg)}}
.smt-center{display:flex;justify-content:center;align-items:center;}

/* ── LOGIN SCREEN ─── */
.smt-login-wrap{max-width:420px;margin:40px auto;padding:0 16px;}
.smt-login-card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:36px 32px;}
.smt-login-logo{width:48px;height:48px;border-radius:12px;background:#eff6ff;display:flex;align-items:center;justify-content:center;margin-bottom:20px;}
.smt-login-logo svg{width:24px;height:24px;}
.smt-login-card h2{font-size:22px;font-weight:700;color:#111827;margin-bottom:4px;}
.smt-login-card .smt-sub{font-size:13px;color:#6b7280;margin-bottom:24px;}
.smt-field{margin-bottom:16px;}
.smt-field label{display:block;font-size:12px;font-weight:600;color:#374151;margin-bottom:5px;}
.smt-field input{width:100%;padding:10px 12px;border:1px solid #d1d5db;border-radius:8px;font-size:14px;transition:border-color .15s;}
.smt-field input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.12);}
.smt-field .smt-err{font-size:12px;color:#dc2626;margin-top:4px;display:none;}
.smt-remember{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;}
.smt-remember label{display:flex;align-items:center;gap:6px;font-size:13px;color:#374151;}
.smt-remember input{width:auto;}
.smt-forgot{font-size:13px;color:#2563eb;cursor:pointer;background:none;border:none;padding:0;}
.smt-btn-primary{width:100%;padding:11px;background:#2563eb;color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;transition:background .15s;}
.smt-btn-primary:hover{background:#1d4ed8;}
.smt-btn-primary:disabled{background:#93c5fd;cursor:not-allowed;}
.smt-form-note{text-align:center;font-size:12px;color:#6b7280;margin-top:14px;}
.smt-form-note a,.smt-form-note span{color:#2563eb;cursor:pointer;}
.smt-global-msg{margin-top:14px;font-size:13px;font-weight:500;text-align:center;display:none;}
.smt-global-msg.ok{color:#16a34a;}
.smt-global-msg.err{color:#dc2626;}

/* ── APP SHELL ─── */
.smt-app{min-height:500px;}
.smt-header{background:#fff;border-bottom:1px solid #e5e7eb;padding:0 24px;display:flex;align-items:center;justify-content:space-between;height:58px;position:sticky;top:0;z-index:50;}
.smt-header-brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:16px;color:#111827;}
.smt-header-brand svg{width:22px;height:22px;color:#2563eb;}
.smt-nav{display:flex;gap:2px;}
.smt-nav-btn{padding:6px 14px;border-radius:7px;border:none;background:none;font-size:13px;font-weight:500;color:#6b7280;cursor:pointer;transition:all .15s;}
.smt-nav-btn:hover{background:#f3f4f6;color:#111827;}
.smt-nav-btn.active{background:#eff6ff;color:#2563eb;}
.smt-header-right{display:flex;align-items:center;gap:12px;}
.smt-avatar{width:34px;height:34px;border-radius:50%;background:#dbeafe;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;color:#1d4ed8;}
.smt-header-name{font-size:13px;font-weight:500;color:#374151;}
.smt-logout-btn{font-size:12px;color:#6b7280;background:none;border:1px solid #e5e7eb;border-radius:6px;padding:4px 10px;cursor:pointer;}
.smt-logout-btn:hover{color:#dc2626;border-color:#fca5a5;}

/* ── PAGE CONTENT ─── */
.smt-page{padding:24px 32px;max-width:100%;margin:0;display:none;}
.smt-page.active{display:block;}
.smt-page-title{font-size:20px;font-weight:700;color:#111827;margin-bottom:20px;}

/* ── STAT CARDS ─── */
.smt-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin-bottom:24px;}
.smt-stat{border-radius:12px;padding:16px 18px;border:1px solid transparent;}
.smt-stat-b{background:#eff6ff;border-color:#bfdbfe;}
.smt-stat-g{background:#f0fdf4;border-color:#bbf7d0;}
.smt-stat-a{background:#fffbeb;border-color:#fde68a;}
.smt-stat-p{background:#f5f3ff;border-color:#ddd6fe;}
.smt-stat-label{font-size:11px;font-weight:600;color:#6b7280;text-transform:uppercase;letter-spacing:.4px;margin-bottom:6px;}
.smt-stat-val{font-size:28px;font-weight:800;color:#111827;line-height:1;}
.smt-stat-sub{font-size:12px;color:#6b7280;margin-top:4px;}

/* ── DASHBOARD GRID ─── */
.smt-dash-grid{display:grid;grid-template-columns:1fr 300px;gap:16px;align-items:start;}
@media(max-width:680px){.smt-dash-grid{grid-template-columns:1fr;}}

/* ── CARDS ─── */
.smt-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;}
.smt-card-head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid #f3f4f6;}
.smt-card-head h3{font-size:14px;font-weight:600;color:#111827;}
.smt-card-body{padding:0;}
.smt-card-footer{padding:10px 18px;border-top:1px solid #f3f4f6;font-size:13px;}
.smt-card-footer a,.smt-card-footer button{color:#2563eb;background:none;border:none;cursor:pointer;font-size:13px;padding:0;}

/* ── TABLE ─── */
.smt-tbl-wrap{overflow-x:auto;}
.smt-tbl{width:100%;border-collapse:collapse;font-size:13px;}
.smt-tbl th{padding:10px 14px;text-align:left;font-size:11px;font-weight:600;color:#6b7280;text-transform:uppercase;letter-spacing:.4px;border-bottom:1px solid #e5e7eb;white-space:nowrap;background:#fafafa;}
.smt-tbl td{padding:10px 14px;border-bottom:1px solid #f3f4f6;vertical-align:top;color:#374151;}
.smt-tbl tr:last-child td{border-bottom:none;}
.smt-tbl tr:hover td{background:#fafafa;}
.smt-tbl .smt-empty{text-align:center;color:#9ca3af;padding:32px;font-style:italic;}

/* ── BADGES ─── */
.smt-badge{display:inline-block;padding:2px 9px;border-radius:20px;font-size:11px;font-weight:600;white-space:nowrap;}
.smt-o-won{background:#dcfce7;color:#166534;}
.smt-o-lost{background:#fee2e2;color:#991b1b;}
.smt-o-pending{background:#fef9c3;color:#854d0e;}
.smt-o-follow-up{background:#dbeafe;color:#1e40af;}
.smt-o-interested{background:#f3e8ff;color:#6b21a8;}
.smt-o-not-interested{background:#f3f4f6;color:#6b7280;}
.smt-t-in-person{background:#dbeafe;color:#1e40af;}
.smt-t-video-call{background:#f3e8ff;color:#6b21a8;}
.smt-t-phone{background:#dcfce7;color:#166534;}
.smt-t-whatsapp{background:#d1fae5;color:#065f46;}
.smt-t-site-visit{background:#ffedd5;color:#9a3412;}

/* ── FOLLOW-UP LIST ─── */
.smt-fu-list{list-style:none;}
.smt-fu-item{padding:12px 18px;border-bottom:1px solid #f3f4f6;display:flex;gap:10px;align-items:flex-start;}
.smt-fu-item:last-child{border-bottom:none;}
.smt-fu-dot{width:8px;height:8px;border-radius:50%;background:#f59e0b;flex-shrink:0;margin-top:5px;}
.smt-fu-dot.overdue{background:#ef4444;}
.smt-fu-name{font-weight:600;font-size:13px;color:#111827;}
.smt-fu-meta{font-size:11px;color:#6b7280;margin:2px 0 6px;}
.smt-fu-overdue .smt-fu-name{color:#ef4444;}
.smt-btn-done{font-size:11px;padding:3px 10px;background:#dcfce7;color:#166534;border:1px solid #bbf7d0;border-radius:6px;cursor:pointer;}
.smt-btn-done:hover{background:#bbf7d0;}

/* ── FORM ─── */
.smt-form-wrap{max-width:900px;}
.smt-section{background:#fff;border:1px solid #e5e7eb;border-radius:12px;margin-bottom:14px;overflow:hidden;}
.smt-section-head{padding:12px 20px;background:#f9fafb;border-bottom:1px solid #e5e7eb;font-size:12px;font-weight:600;color:#2563eb;text-transform:uppercase;letter-spacing:.5px;}
.smt-section-body{padding:18px 20px;}
.smt-row2{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.smt-row3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px;}
@media(max-width:540px){.smt-row2,.smt-row3{grid-template-columns:1fr;}}
.smt-fg{display:flex;flex-direction:column;gap:5px;margin-bottom:14px;}
.smt-fg:last-child{margin-bottom:0;}
.smt-fg label{font-size:12px;font-weight:600;color:#374151;}
.smt-fg input,.smt-fg select,.smt-fg textarea{padding:9px 12px;border:1px solid #d1d5db;border-radius:8px;font-size:13px;width:100%;font-family:inherit;}
.smt-fg input:focus,.smt-fg select:focus,.smt-fg textarea:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.1);}
.smt-fg textarea{resize:vertical;min-height:80px;}
.smt-req{color:#ef4444;}
.smt-form-actions{display:flex;align-items:center;gap:12px;padding:4px 0 16px;}
.smt-btn-save{padding:10px 24px;background:#2563eb;color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;}
.smt-btn-save:hover{background:#1d4ed8;}
.smt-btn-save:disabled{background:#93c5fd;}
.smt-btn-cancel{padding:10px 18px;background:none;border:1px solid #d1d5db;border-radius:8px;font-size:13px;color:#374151;cursor:pointer;}
.smt-btn-cancel:hover{border-color:#9ca3af;}
.smt-save-msg{font-size:13px;font-weight:500;}
.smt-save-msg.ok{color:#16a34a;}
.smt-save-msg.err{color:#dc2626;}

/* ── FILTER BAR ─── */
.smt-filters{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:14px 18px;margin-bottom:16px;display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;}
.smt-filters label{display:block;font-size:11px;font-weight:600;color:#6b7280;margin-bottom:4px;}
.smt-filters input,.smt-filters select{padding:7px 10px;border:1px solid #d1d5db;border-radius:7px;font-size:13px;}
.smt-btn-filter{padding:8px 16px;background:#f3f4f6;border:1px solid #d1d5db;border-radius:7px;font-size:13px;font-weight:500;cursor:pointer;}
.smt-btn-filter:hover{background:#e5e7eb;}

/* ── REPORT TABLE ─── */
.smt-winbar{display:flex;align-items:center;gap:8px;}
.smt-winbar-track{height:6px;background:#e5e7eb;border-radius:3px;flex:1;min-width:50px;}
.smt-winbar-fill{height:100%;background:#16a34a;border-radius:3px;}
.smt-winbar span{font-size:12px;font-weight:600;white-space:nowrap;}

/* ── PROFILE ─── */
.smt-profile-wrap{max-width:480px;}
.smt-profile-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:28px;}
.smt-profile-top{display:flex;align-items:center;gap:16px;margin-bottom:24px;}
.smt-profile-avatar{width:56px;height:56px;border-radius:50%;background:#dbeafe;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:800;color:#1d4ed8;}
.smt-profile-name{font-size:18px;font-weight:700;color:#111827;}
.smt-profile-role{font-size:13px;color:#6b7280;}
.smt-divider{border:none;border-top:1px solid #f3f4f6;margin:20px 0;}

/* ── ACTION LINKS ─── */
.smt-action{color:#2563eb;background:none;border:none;cursor:pointer;font-size:12px;padding:0;margin-right:8px;}
.smt-action:hover{text-decoration:underline;}
.smt-action.del{color:#dc2626;}
.smt-notes-row td{background:#fafafa !important;font-size:12px;color:#6b7280;}
.smt-notes-lbl{font-weight:600;color:#374151;}
.smt-overdue-txt{color:#ef4444;font-weight:600;}
.smt-tbl-count{font-size:12px;color:#6b7280;margin-top:8px;}

/* ── AD & UPGRADE CHECKBOXES ─── */
.smt-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}
.smt-cb-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 12px;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all .15s;
    text-align: center;
    position: relative;
    user-select: none;
}
.smt-cb-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.smt-cb-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    flex-shrink: 0;
}
.smt-cb-card input:checked ~ .smt-cb-icon::after {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
}
.smt-cb-label {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

/* Blue — Front Cover */
.smt-cb-blue  { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.smt-cb-blue:hover  { border-color: #93c5fd; background: #dbeafe; }
.smt-cb-blue:has(input:checked)  { background: #dbeafe; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }

/* Purple — Back Cover */
.smt-cb-purple { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.smt-cb-purple:hover  { border-color: #c4b5fd; background: #ede9fe; }
.smt-cb-purple:has(input:checked) { background: #ede9fe; border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,.15); }

/* Teal — Inner Page */
.smt-cb-teal  { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.smt-cb-teal:hover  { border-color: #86efac; background: #dcfce7; }
.smt-cb-teal:has(input:checked)  { background: #dcfce7; border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.15); }

/* Amber — Award Upgrade */
.smt-cb-amber { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.smt-cb-amber:hover  { border-color: #fcd34d; background: #fef3c7; }
.smt-cb-amber:has(input:checked) { background: #fef3c7; border-color: #d97706; box-shadow: 0 0 0 3px rgba(217,119,6,.15); }

/* ── AD INTEREST BADGES (table display) ─── */
.smt-ad-fc { background: #dbeafe; color: #1e40af; }
.smt-ad-bc { background: #ede9fe; color: #5b21b6; }
.smt-ad-ip { background: #dcfce7; color: #166534; }
.smt-ad-au { background: #fef3c7; color: #92400e; }

/* ── FORM TOPBAR (title + back button) ─── */
.smt-form-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.smt-back-btn {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #374151 !important;
    background: #fff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.smt-back-btn:hover {
    background: #f9fafb !important;
    border-color: #9ca3af !important;
    color: #111827 !important;
}

/* ── VISITING CARD UPLOAD ─── */
.smt-card-upload-wrap { width: 100%; }

.smt-card-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 140px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: #f9fafb;
    cursor: pointer;
    transition: all .15s;
    padding: 24px;
    text-align: center;
}
.smt-card-dropzone:hover,
.smt-drag-over {
    border-color: #2563eb;
    background: #eff6ff;
}
.smt-card-drop-icon { margin-bottom: 4px; }
.smt-card-drop-text {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}
.smt-card-drop-sub {
    font-size: 12px;
    color: #9ca3af;
}
.smt-card-uploading {
    font-size: 13px;
    color: #2563eb;
    font-weight: 500;
    margin-top: 4px;
}

/* Preview */
.smt-card-preview {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #f9fafb;
    max-width: 380px;
}
.smt-card-preview img {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    display: block;
    background: #fff;
    padding: 8px;
}
.smt-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}
.smt-card-view {
    font-size: 13px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}
.smt-card-view:hover { text-decoration: underline; }
.smt-card-remove {
    font-size: 12px;
    color: #dc2626;
    background: none;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: 4px 12px;
    cursor: pointer;
    transition: all .15s;
}
.smt-card-remove:hover { background: #fee2e2; }

/* ── v3.0: SCHEDULED MEETINGS ── */

/* Nav icons alignment */
.smt-nav-btn svg { vertical-align: middle; margin-right: 4px; }

/* Scheduled badge variants */
.smt-sched-upcoming  { background:#eff6ff; color:#1d4ed8; }
.smt-sched-today     { background:#fef3c7; color:#92400e; font-weight:700; }
.smt-sched-overdue   { background:#fee2e2; color:#991b1b; }
.smt-sched-converted { background:#d1fae5; color:#065f46; }

/* Schedule new button in page title */
.smt-btn-sched-new {
    margin-left: 14px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid #a7f3d0;
    border-radius: 7px;
    color: #065f46;
    background: #ecfdf5;
    cursor: pointer;
    transition: background .15s;
}
.smt-btn-sched-new:hover { background: #d1fae5; }

/* Scheduled form card */
.smt-sched-form-card {
    background: #fff;
    border: 1.5px solid #a7f3d0;
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(16,185,129,.08);
}
.smt-sched-form-title {
    font-size: 15px;
    font-weight: 700;
    color: #065f46;
    margin-bottom: 16px;
}
.smt-sched-actions { white-space: nowrap; }

/* Row tint for converted rows */
.smt-row-converted td { opacity: .55; }

/* Dash right column */
.smt-dash-right { display: flex; flex-direction: column; gap: 18px; }

/* Dashboard upcoming scheduled items */
.smt-sched-dash-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    transition: background .12s;
}
.smt-sched-dash-item:last-child { border-bottom: none; }
.smt-sched-dash-item:hover { background: #f9fafb; }
.smt-sched-dash-today { background: #fffbeb; border-left: 3px solid #f59e0b; }
.smt-sched-dash-date { font-size: 12px; color: #6b7280; margin-bottom: 3px; display: flex; align-items: center; gap: 5px; }
.smt-sched-time { font-size: 11px; color: #9ca3af; }
.smt-sched-today-dot { width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; display: inline-block; }
.smt-sched-dash-contact { font-size: 14px; font-weight: 600; color: #111827; }
.smt-sched-co { font-weight: 400; color: #6b7280; }
.smt-sched-dash-purpose { font-size: 12px; color: #9ca3af; margin-top: 2px; }
.smt-sched-dash-actions { margin-top: 7px; display: flex; gap: 6px; }

/* Empty state */
.smt-empty-state {
    display: flex; flex-direction: column; align-items: center;
    padding: 48px 24px; text-align: center; color: #9ca3af;
}
.smt-empty-state p { font-size: 14px; margin-top: 12px; }

/* Modal overlay */
.smt-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.45);
    z-index: 9999; display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.smt-modal {
    background: #fff; border-radius: 14px;
    padding: 24px 28px; max-width: 520px; width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    animation: smt-modal-in .18s ease;
}
@keyframes smt-modal-in { from { transform: scale(.94); opacity:0; } to { transform: scale(1); opacity:1; } }
.smt-modal-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.smt-modal-head h3 { font-size:16px; font-weight:700; color:#111827; margin:0; }
.smt-modal-close { background:none; border:none; font-size:18px; color:#9ca3af; cursor:pointer; padding:2px 6px; border-radius:4px; }
.smt-modal-close:hover { background:#f3f4f6; color:#374151; }

/* Toast */
.smt-toast {
    position: fixed; bottom: 28px; right: 24px;
    background: #1f2937; color: #fff; border-radius: 10px;
    padding: 12px 20px; font-size: 14px; font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,.25); z-index: 99999;
    opacity: 0; transform: translateY(12px); transition: all .3s;
    pointer-events: none; max-width: 340px;
}
.smt-toast.smt-toast-show { opacity:1; transform:translateY(0); }
.smt-toast.smt-toast-ok { background: #065f46; border-left: 4px solid #10b981; }
.smt-toast.smt-toast-err { background: #991b1b; border-left: 4px solid #ef4444; }

/* Cancel button */
.smt-cancel-btn {
    background: none; border: 1px solid #e5e7eb; border-radius: 7px;
    color: #6b7280; font-size: 13px; padding: 8px 16px; cursor: pointer;
    transition: all .15s;
}
.smt-cancel-btn:hover { background: #f3f4f6; color: #374151; }

/* Back button */
.smt-back-btn {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 600; color: #6b7280;
    background: #f3f4f6; border: 1px solid #e5e7eb;
    border-radius: 7px; padding: 5px 12px; cursor: pointer;
    margin-right: 10px; vertical-align: middle;
    transition: all .15s;
}
.smt-back-btn:hover { background: #e5e7eb; color: #374151; }
