/* ============================================================
   Think Expand — Frontend Operator Dashboard CSS
   ============================================================ */
/* Brand colours are overridden inline by PHP from operator settings.
   These are fallback defaults only. */
:root{
  --te-primary:#1a3c6e; --te-accent:#f59e0b; --te-green:#16a34a;
  --te-red:#e11d48; --te-gray:#64748b; --te-border:#e2e8f0;
  --te-light:#f8fafc; --te-white:#fff; --te-dark:#0f172a;
  --te-shadow:0 2px 12px rgba(0,0,0,.08);
}

/* ── Wrap ── */
.tethbe-dash-wrap{font-family:'Segoe UI',system-ui,sans-serif;color:var(--te-dark);max-width:1200px;margin:0 auto;}
.tethbe-dash-wrap *{box-sizing:border-box;}

/* ── Login screen ── */
.tethbe-login-screen{min-height:500px;display:flex;align-items:center;justify-content:center;padding:40px 20px;}
.tethbe-login-card{background:var(--te-white);border-radius:20px;padding:40px;width:100%;max-width:420px;box-shadow:0 8px 40px rgba(0,0,0,.12);}
.tethbe-login-brand{display:flex;align-items:center;gap:14px;margin-bottom:28px;}
.tethbe-login-logo{width:48px;height:48px;background:var(--te-primary);border-radius:12px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:18px;font-weight:800;}
.tethbe-login-title{font-size:18px;font-weight:800;color:var(--te-dark);}
.tethbe-login-sub{font-size:12px;color:var(--te-gray);}
.tethbe-login-form .tethbe-field-group{margin-bottom:16px;}
.tethbe-login-licence{margin-top:20px;font-size:12px;color:var(--te-gray);text-align:center;border-top:1px solid var(--te-border);padding-top:14px;}

/* ── Dashboard header ── */
.tethbe-dash-header{background:var(--te-primary);color:#fff;padding:16px 24px;border-radius:14px 14px 0 0;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;}
.tethbe-dash-header-left{display:flex;align-items:center;gap:14px;}
.tethbe-dash-logo{width:40px;height:40px;background:rgba(255,255,255,.15);border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:800;color:#fff;}
.tethbe-dash-site-name{font-size:16px;font-weight:700;color:#fff;}
.tethbe-dash-welcome{font-size:13px;color:rgba(255,255,255,.7);}
.tethbe-dash-header-right{display:flex;align-items:center;gap:10px;}
.tethbe-tier-pill{background:rgba(255,255,255,.2);color:#fff;font-size:11px;font-weight:700;padding:4px 12px;border-radius:20px;text-transform:uppercase;letter-spacing:.5px;}

/* ── Tabs ── */
.tethbe-dash-tabs{display:flex;gap:0;background:var(--te-white);border-bottom:2px solid var(--te-border);overflow-x:auto;}
.tethbe-dash-tab{padding:14px 20px;font-size:14px;font-weight:600;color:var(--te-gray);text-decoration:none;border-bottom:3px solid transparent;white-space:nowrap;transition:all .2s;margin-bottom:-2px;}
.tethbe-dash-tab:hover{color:var(--te-primary);}
.tethbe-dash-tab.active{color:var(--te-primary);border-bottom-color:var(--te-primary);}

/* Sub-tabs */
.tethbe-subtabs{display:flex;gap:6px;margin-bottom:18px;flex-wrap:wrap;}
.tethbe-subtab{padding:7px 16px;font-size:13px;font-weight:600;color:var(--te-gray);text-decoration:none;border:2px solid var(--te-border);border-radius:30px;transition:all .2s;}
.tethbe-subtab.active,.tethbe-subtab:hover{background:var(--te-primary);color:#fff;border-color:var(--te-primary);}

/* ── Content area ── */
.tethbe-dash-content{background:var(--te-light);padding:24px;border-radius:0 0 14px 14px;min-height:500px;}

/* ── Cards ── */
.tethbe-dash-card{background:var(--te-white);border-radius:12px;padding:22px 24px;margin-bottom:20px;box-shadow:var(--te-shadow);}
.tethbe-dash-card h3{margin:0 0 16px;font-size:16px;font-weight:700;color:var(--te-dark);border-bottom:1px solid var(--te-border);padding-bottom:10px;}
.tethbe-card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;border-bottom:1px solid var(--te-border);padding-bottom:10px;}
.tethbe-card-header h3{margin:0;border:none;padding:0;}

/* ── Stats ── */
.tethbe-overview-stats{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:20px;}
.tethbe-stat-card{background:var(--te-white);border-radius:12px;padding:16px 20px;flex:1;min-width:120px;box-shadow:var(--te-shadow);border-top:4px solid var(--te-primary);}
.tethbe-stat-num{font-size:26px;font-weight:800;line-height:1;}
.tethbe-stat-label{font-size:11px;color:var(--te-gray);margin-top:5px;text-transform:uppercase;letter-spacing:.5px;}

/* Booking status mini-stats */
.tethbe-booking-stats{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:16px;}
.tethbe-mini-stat{background:var(--te-white);border-radius:10px;padding:12px 16px;display:flex;flex-direction:column;align-items:center;gap:4px;text-decoration:none;font-size:12px;color:var(--te-gray);font-weight:600;border:2px solid var(--te-border);transition:all .2s;min-width:80px;}
.tethbe-mini-stat.active,.tethbe-mini-stat:hover{border-color:currentColor;}

/* ── Table ── */
.tethbe-table-wrap{overflow-x:auto;}
.tethbe-dash-table{width:100%;border-collapse:collapse;font-size:13px;}
.tethbe-dash-table th{background:var(--te-light);padding:9px 12px;text-align:left;font-weight:700;color:var(--te-gray);border-bottom:2px solid var(--te-border);white-space:nowrap;}
.tethbe-dash-table td{padding:10px 12px;border-bottom:1px solid var(--te-border);vertical-align:middle;}
.tethbe-dash-table tr:last-child td{border-bottom:none;}
.tethbe-dash-table tr:hover td{background:#f9fafb;}
.tethbe-ref{font-size:11px;background:var(--te-light);padding:2px 6px;border-radius:4px;font-family:monospace;user-select:all;}
.tethbe-customer-name{font-weight:600;font-size:13px;}
.tethbe-customer-phone{font-size:12px;color:var(--te-gray);}
.tethbe-customer-email{font-size:11px;color:#94a3b8;}
.tethbe-action-btns{display:flex;flex-direction:column;gap:4px;min-width:80px;}

/* Detail table (booking modal) */
.tethbe-detail-table{width:100%;border-collapse:collapse;font-size:14px;}
.tethbe-detail-table th{padding:8px 12px;text-align:left;font-weight:600;color:var(--te-gray);width:120px;border-bottom:1px solid var(--te-border);}
.tethbe-detail-table td{padding:8px 12px;border-bottom:1px solid var(--te-border);color:var(--te-dark);}

/* ── Badges ── */
.tethbe-badge{display:inline-block;padding:2px 9px;border-radius:20px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;margin:1px;}
.tethbe-badge-gray{background:#f1f5f9;color:#475569;}
.tethbe-badge-blue{background:#dbeafe;color:#1d4ed8;}
.tethbe-badge-green{background:#dcfce7;color:#15803d;}
.tethbe-badge-amber{background:#fef3c7;color:#b45309;}
.tethbe-badge-red{background:#fee2e2;color:#dc2626;}

/* ── Buttons ── */
.tethbe-dash-btn{display:inline-block;padding:9px 18px;border-radius:8px;font-size:13px;font-weight:700;cursor:pointer;text-decoration:none;border:none;transition:all .2s;text-align:center;}
.tethbe-btn-primary{background:var(--te-primary);color:#fff;} .tethbe-btn-primary:hover{background:#1e40af;color:#fff;}
.tethbe-btn-outline{background:transparent;color:var(--te-primary);border:2px solid var(--te-primary);} .tethbe-btn-outline:hover{background:#eff6ff;}
.tethbe-btn-ghost{background:#f1f5f9;color:#475569;border:1px solid #e2e8f0;} .tethbe-btn-ghost:hover{background:#e2e8f0;}
.tethbe-dash-header .tethbe-btn-ghost{background:rgba(255,255,255,.15);color:#fff;border-color:transparent;} .tethbe-dash-header .tethbe-btn-ghost:hover{background:rgba(255,255,255,.25);}
.tethbe-btn-success{background:var(--te-green);color:#fff;} .tethbe-btn-success:hover{background:#15803d;}
.tethbe-btn-danger{background:var(--te-red);color:#fff;}
.tethbe-btn-whatsapp{background:#25D366;color:#fff;font-weight:700;} .tethbe-btn-whatsapp:hover{background:#1ebe5d;color:#fff;}
.tethbe-btn-full{width:100%;display:block;text-align:center;}
.tethbe-btn-sm{padding:5px 12px;font-size:12px;}

/* ── Form fields ── */
.tethbe-field-group{display:flex;flex-direction:column;gap:5px;margin-bottom:14px;}
.tethbe-field-group label{font-size:11px;font-weight:700;color:var(--te-gray);text-transform:uppercase;letter-spacing:.5px;}
.tethbe-field-group input,
.tethbe-field-group select,
.tethbe-field-group textarea{padding:11px 14px;border:2px solid var(--te-border);border-radius:10px;font-size:14px;color:var(--te-dark);background:var(--te-white);outline:none;transition:border-color .2s;font-family:inherit;width:100%;}
.tethbe-field-group input:focus,
.tethbe-field-group select:focus,
.tethbe-field-group textarea:focus{border-color:var(--te-primary);}
.tethbe-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.tethbe-form-grid .tethbe-full,.tethbe-full{grid-column:1/-1;}

/* ── Fleet board ── */
.tethbe-fleet-board{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px;}
.tethbe-fleet-card{background:var(--te-white);border-radius:12px;overflow:hidden;box-shadow:var(--te-shadow);transition:transform .2s;}
.tethbe-fleet-card:hover{transform:translateY(-3px);}
.tethbe-fleet-img{height:140px;background:#e2e8f0 center/cover;display:flex;align-items:center;justify-content:center;font-size:48px;}
.tethbe-fleet-img-placeholder{background:var(--te-light);}
.tethbe-fleet-body{padding:14px;}
.tethbe-fleet-name{font-size:15px;font-weight:800;color:var(--te-dark);margin-bottom:2px;}
.tethbe-fleet-type{font-size:12px;color:var(--te-gray);margin-bottom:8px;}
.tethbe-fleet-meta{display:flex;gap:10px;font-size:12px;color:var(--te-gray);margin-bottom:8px;}
.tethbe-fleet-rate{font-size:16px;font-weight:800;color:var(--te-primary);}
.tethbe-fleet-profit{font-size:12px;font-weight:600;margin-top:2px;}
.tethbe-fleet-status-bar{margin:10px 0;padding:5px 10px;border-radius:6px;font-size:11px;font-weight:700;color:#fff;text-align:center;text-transform:uppercase;letter-spacing:.5px;}
.tethbe-fleet-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap;}
.tethbe-status-select{font-size:12px;padding:4px 8px;border:1.5px solid var(--te-border);border-radius:6px;cursor:pointer;flex:1;min-width:0;}

/* ── Quick actions ── */
.tethbe-quick-actions{display:flex;gap:10px;flex-wrap:wrap;}

/* ── Pagination ── */
.tethbe-pagination{display:flex;gap:8px;align-items:center;margin-top:16px;}
.tethbe-pagination span{font-size:13px;color:var(--te-gray);}

/* ── Notices ── */
.tethbe-dash-notice{padding:12px 16px;border-radius:8px;font-size:14px;margin:8px 0;}
.tethbe-notice-success{background:#f0fdf4;color:#15803d;border:1px solid #bbf7d0;}
.tethbe-notice-error{background:#fef2f2;color:#dc2626;border:1px solid #fecaca;}
.tethbe-notice-warning{background:#fffbeb;color:#92400e;border:1px solid #fcd34d;}
.tethbe-empty{color:#94a3b8;font-style:italic;text-align:center;padding:30px 0;}

/* ── Modals ── */
.tethbe-modal-bg{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:99999;display:flex;align-items:center;justify-content:center;padding:20px;}
.tethbe-modal-box{background:var(--te-white);border-radius:16px;width:100%;max-width:600px;max-height:85vh;overflow-y:auto;box-shadow:0 20px 60px rgba(0,0,0,.3);}
.tethbe-modal-header{display:flex;justify-content:space-between;align-items:center;padding:20px 24px;border-bottom:1px solid var(--te-border);}
.tethbe-modal-header h3{margin:0;font-size:17px;font-weight:700;}
.tethbe-modal-close{background:var(--te-light);border:none;width:32px;height:32px;border-radius:8px;cursor:pointer;font-size:16px;display:flex;align-items:center;justify-content:center;color:var(--te-gray);}
.tethbe-modal-body{padding:24px;}

/* ── Locked prompt ── */
.tethbe-locked-prompt{display:flex;gap:16px;align-items:flex-start;background:#fffbeb;border:1px solid #fcd34d;border-radius:10px;padding:20px 24px;margin:16px 0;}
.tethbe-locked-icon{font-size:28px;line-height:1;flex-shrink:0;}
.tethbe-locked-content h4{margin:0 0 6px;font-size:15px;color:#92400e;}
.tethbe-locked-content p{margin:0 0 4px;font-size:13px;color:#78350f;}
.tethbe-locked-price{font-size:18px!important;font-weight:700;color:var(--te-primary)!important;}
.tethbe-upgrade-btn{display:inline-block;margin-top:12px;padding:10px 20px;background:#25D366;color:#fff;font-weight:700;font-size:13px;border-radius:8px;text-decoration:none;}
.tethbe-upgrade-btn:hover{background:#1ebe5d;color:#fff;}


/* ── Settings grid ── */
.tethbe-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;}
.tethbe-settings-full{grid-column:1/-1;}
.tethbe-licence-status-row{display:flex;gap:24px;flex-wrap:wrap;align-items:center;}
.tethbe-lic-block{min-width:120px;}
.tethbe-lic-label{font-size:11px;color:#94a3b8;text-transform:uppercase;letter-spacing:.5px;margin-bottom:3px;}
.tethbe-lic-val{font-size:20px;font-weight:800;line-height:1;}
.tethbe-colour-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px;margin-bottom:14px;}
@media(max-width:900px){.tethbe-settings-grid{grid-template-columns:1fr;}.tethbe-settings-full{grid-column:1;}.tethbe-colour-row{grid-template-columns:1fr 1fr;}}
@media(max-width:480px){.tethbe-colour-row{grid-template-columns:1fr;}}

/* ── Responsive ── */
@media(max-width:768px){
  .tethbe-dash-content{padding:16px;}
  .tethbe-form-grid{grid-template-columns:1fr;}
  .tethbe-form-grid .tethbe-full{grid-column:1;}
  .tethbe-overview-stats{flex-wrap:wrap;}
  .tethbe-stat-card{min-width:calc(50% - 8px);}
  .tethbe-dash-header{border-radius:10px 10px 0 0;}
  .tethbe-fleet-board{grid-template-columns:1fr 1fr;}
  .tethbe-modal-box{max-height:95vh;}
}
@media(max-width:480px){
  .tethbe-fleet-board{grid-template-columns:1fr;}
  .tethbe-stat-card{min-width:100%;}
  .tethbe-dash-tab{padding:10px 14px;font-size:13px;}
}

/* ── Drag-and-drop uploader — shared across Properties & Travel/Tour tabs.
   Lives here (not tab-scoped) since only one tab's PHP renders per page
   load, and this must be available regardless of which tab that is. ── */
.tethbe-dropzone{border:2px dashed #cbd5e1;border-radius:10px;padding:18px;text-align:center;cursor:pointer;background:#f8fafc;transition:all .15s;position:relative;}
.tethbe-dropzone:hover,.tethbe-dropzone-active{border-color:#1a3c6e;background:#eff6ff;}
.tethbe-dropzone-hint{color:#64748b;font-size:13px;}
.tethbe-dropzone-thumb{max-width:100%;max-height:140px;border-radius:8px;display:block;margin:0 auto 8px;}
.tethbe-dropzone-remove{background:#fee2e2;color:#b91c1c;border:none;border-radius:6px;padding:5px 10px;font-size:12px;font-weight:600;cursor:pointer;}
.tethbe-upload-status{font-size:12px;color:#64748b;margin-top:6px;}
.tethbe-gallery-thumbs{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;}
.tethbe-gallery-thumb{position:relative;width:72px;height:72px;border-radius:8px;overflow:hidden;border:1px solid #e2e8f0;}
.tethbe-gallery-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.tethbe-gallery-thumb button{position:absolute;top:2px;right:2px;background:rgba(220,38,38,.9);color:#fff;border:none;border-radius:50%;width:20px;height:20px;font-size:11px;line-height:1;cursor:pointer;}

/* ── Booking Calendar ── */
.tethbe-cal-controls{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;margin-bottom:14px;}
.tethbe-cal-type-toggle{display:flex;gap:6px;}
.tethbe-cal-type-btn{padding:7px 14px;border-radius:20px;border:1px solid #e2e8f0;background:#fff;color:#64748b;font-size:13px;font-weight:600;cursor:pointer;transition:all .15s;}
.tethbe-cal-type-btn.active{background:var(--te-primary,#1a3c6e);color:#fff;border-color:var(--te-primary,#1a3c6e);}
.tethbe-cal-item-select{padding:8px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;min-width:180px;flex:1 1 180px;box-sizing:border-box;}
.tethbe-cal-month-nav{display:flex;align-items:center;gap:8px;}
.tethbe-cal-month-label{font-weight:700;font-size:14px;color:#0f172a;min-width:130px;text-align:center;}

/* Legend + day-cell colours — bold, saturated fills rather than pale
   tints, with dark high-contrast text, so Booked/Pending/Free read
   clearly at a glance instead of blending into the grid. */
.tethbe-cal-legend{display:flex;gap:18px;flex-wrap:wrap;font-size:13px;color:#334155;font-weight:600;margin-bottom:12px;}
.tethbe-cal-legend span{display:flex;align-items:center;gap:6px;}
.tethbe-cal-dot{display:inline-block;width:12px;height:12px;border-radius:4px;border:1px solid rgba(0,0,0,.08);}
.tethbe-cal-dot-booked{background:#ef4444;}
.tethbe-cal-dot-pending{background:#f59e0b;}
.tethbe-cal-dot-free{background:#22c55e;}

.tethbe-cal-grid{border:1px solid #e2e8f0;border-radius:10px;overflow:hidden;}
.tethbe-cal-weekdays{display:grid;grid-template-columns:repeat(7,1fr);background:#f8fafc;border-bottom:1px solid #e2e8f0;}
.tethbe-cal-weekdays div{padding:8px 4px;text-align:center;font-size:11px;font-weight:700;color:#94a3b8;text-transform:uppercase;}
.tethbe-cal-days{display:grid;grid-template-columns:repeat(7,1fr);}
.tethbe-cal-day{position:relative;aspect-ratio:1/1;min-height:48px;display:flex;align-items:flex-start;justify-content:flex-end;padding:6px;border-right:1px solid #f1f5f9;border-bottom:1px solid #f1f5f9;font-size:13px;font-weight:600;color:#334155;cursor:default;box-sizing:border-box;}
.tethbe-cal-day-empty{background:#fafbfc;}
.tethbe-cal-day-today{box-shadow:inset 0 0 0 2px var(--te-primary,#1a3c6e);font-weight:800;border-radius:4px;}
.tethbe-cal-day-free{background:#f0fdf4;color:#15803d;}
.tethbe-cal-day-booked{background:#ef4444;color:#fff;font-weight:800;}
.tethbe-cal-day-booked:hover{background:#dc2626;}
.tethbe-cal-day-pending{background:#f59e0b;color:#fff;font-weight:800;}
.tethbe-cal-day-pending:hover{background:#d97706;}
.tethbe-cal-day-clickable{cursor:pointer;}
.tethbe-cal-day-count{position:absolute;bottom:5px;left:6px;background:rgba(255,255,255,.9);color:#0f172a;border-radius:10px;padding:1px 6px;font-size:10px;font-weight:800;}

.tethbe-cal-detail{margin-top:14px;padding:14px 16px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;font-size:13px;line-height:1.7;}
.tethbe-cal-detail-item{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:12px 14px;margin-bottom:10px;}
.tethbe-cal-detail-item:last-child{margin-bottom:0;}

@media(max-width:600px){
  .tethbe-cal-day{font-size:11px;padding:4px;min-height:38px;}
  .tethbe-cal-month-label{min-width:auto;}
}

