/* =========================================================
   Harbour Ops Suite — Public Styles
   ========================================================= */

:root {
    --hops-primary:     #1a73e8;
    --hops-primary-dk:  #1558b0;
    --hops-success:     #2e7d32;
    --hops-danger:      #c62828;
    --hops-warning:     #f57c00;
    --hops-bg:          #f8f9fa;
    --hops-border:      #dee2e6;
    --hops-text:        #212529;
    --hops-muted:       #6c757d;
    --hops-radius:      8px;
    --hops-shadow:      0 2px 8px rgba(0,0,0,0.10);
}

/* ---- Shared ---- */
.harbour-btn {
    display: inline-block;
    padding: 10px 22px;
    border: none;
    border-radius: var(--hops-radius);
    background: var(--hops-primary);
    color: #fff !important;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    line-height: 1.4;
}

.harbour-btn:hover {
    background: var(--hops-primary-dk);
    color: #fff !important;
    text-decoration: none;
    transform: translateY(-1px);
}

.harbour-btn:active { transform: translateY(0); }

.harbour-btn--primary  { background: var(--hops-primary); }
.harbour-btn--small    { padding: 5px 12px; font-size: 0.85em; }
.harbour-btn--large    { padding: 14px 30px; font-size: 1.1em; }
.harbour-btn--pay      { background: #2e7d32; }
.harbour-btn--pay:hover { background: #1b5e20; }

.harbour-field {
    margin-bottom: 16px;
}

.harbour-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: var(--hops-text);
}

.harbour-field .req { color: var(--hops-danger); }

.harbour-field input,
.harbour-field select,
.harbour-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--hops-border);
    border-radius: var(--hops-radius);
    font-size: 1em;
    color: var(--hops-text);
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.harbour-field input:focus,
.harbour-field select:focus,
.harbour-field textarea:focus {
    outline: none;
    border-color: var(--hops-primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}

.harbour-notice {
    background: var(--hops-bg);
    border: 1px solid var(--hops-border);
    border-left: 4px solid var(--hops-primary);
    border-radius: var(--hops-radius);
    padding: 12px 16px;
    margin: 12px 0;
    font-size: 0.95em;
}

.harbour-error {
    background: #fff5f5;
    border: 1px solid #fca5a5;
    border-left: 4px solid var(--hops-danger);
    border-radius: var(--hops-radius);
    padding: 12px 16px;
    margin: 12px 0;
    color: var(--hops-danger);
    font-size: 0.95em;
}

/* ---- Status badges ---- */
.harbour-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: capitalize;
}
.harbour-status--requested  { background: #fff3cd; color: #856404; }
.harbour-status--confirmed  { background: #d1ecf1; color: #0c5460; }
.harbour-status--completed  { background: #d4edda; color: #155724; }
.harbour-status--canceled   { background: #f8d7da; color: #721c24; }
.harbour-status--unpaid     { background: #fff3cd; color: #856404; }
.harbour-status--paid       { background: #d4edda; color: #155724; }
.harbour-status--past_due   { background: #f8d7da; color: #721c24; }
.harbour-status--open       { background: #cce5ff; color: #004085; }
.harbour-status--in_progress { background: #fff3cd; color: #856404; }
.harbour-status--closed     { background: #d4edda; color: #155724; }

/* =========================================================
   Booking Form
   ========================================================= */
.harbour-booking-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--hops-shadow);
}

.harbour-booking-wrap h3 {
    font-size: 1.5em;
    margin: 0 0 20px;
    color: var(--hops-text);
}

.harbour-form-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--hops-border);
}

.harbour-form-section:last-of-type { border-bottom: none; }

.harbour-form-section h4 {
    font-size: 1em;
    font-weight: 700;
    margin: 0 0 14px;
    color: var(--hops-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8em;
}

.harbour-booking-success {
    text-align: center;
    padding: 32px 16px;
}

.harbour-booking-success h3 { font-size: 1.6em; color: var(--hops-success); }

/* Time slots grid */
.harbour-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.harbour-slot-btn {
    padding: 8px 4px;
    text-align: center;
    background: #f0f4ff;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--hops-primary);
    transition: all 0.15s;
}

.harbour-slot-btn:hover { border-color: var(--hops-primary); background: #e0eaff; }
.harbour-slot-btn.selected { background: var(--hops-primary); color: #fff; border-color: var(--hops-primary); }

/* =========================================================
   Customer Portal
   ========================================================= */
.harbour-portal-wrap {
    max-width: 780px;
    margin: 0 auto;
}

.harbour-portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.harbour-portal-header h3 { margin: 0; font-size: 1.4em; }

.harbour-portal-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--hops-border);
    margin-bottom: 20px;
    overflow-x: auto;
}

.harbour-tab-btn {
    padding: 10px 18px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    color: var(--hops-muted);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color 0.2s;
}

.harbour-tab-btn:hover { color: var(--hops-primary); }
.harbour-tab-btn.active { color: var(--hops-primary); border-bottom-color: var(--hops-primary); }

.harbour-portal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.harbour-portal-table th,
.harbour-portal-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--hops-border);
    text-align: left;
}

.harbour-portal-table th {
    background: var(--hops-bg);
    font-weight: 700;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hops-muted);
}

.harbour-portal-table tr:last-child td { border-bottom: none; }

.harbour-portal-login {
    max-width: 400px;
    margin: 0 auto;
    padding: 28px;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--hops-shadow);
}

/* =========================================================
   Invoice Lookup
   ========================================================= */
.harbour-invoice-lookup-wrap {
    max-width: 480px;
    margin: 0 auto;
}

.harbour-invoice-card {
    background: #fff;
    border: 1px solid var(--hops-border);
    border-radius: 12px;
    padding: 24px;
    margin-top: 20px;
    box-shadow: var(--hops-shadow);
}

.harbour-invoice-card h4 {
    margin: 0 0 16px;
    font-size: 1.3em;
    color: var(--hops-text);
}

/* =========================================================
   Services Grid
   ========================================================= */
.harbour-services-grid {
    display: grid;
    gap: 24px;
}

.harbour-services-grid--cols-1 { grid-template-columns: 1fr; }
.harbour-services-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.harbour-services-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.harbour-services-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .harbour-services-grid--cols-3,
    .harbour-services-grid--cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .harbour-services-grid { grid-template-columns: 1fr; }
}

.harbour-service-card {
    background: #fff;
    border: 1px solid var(--hops-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--hops-shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}

.harbour-service-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.harbour-service-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.harbour-service-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.harbour-service-title {
    font-size: 1.1em;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--hops-text);
}

.harbour-service-desc {
    font-size: 0.9em;
    color: var(--hops-muted);
    flex: 1;
    margin-bottom: 12px;
}

.harbour-service-desc p { margin: 0 0 8px; }

.harbour-service-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.harbour-service-price {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--hops-primary);
}

.harbour-service-duration {
    font-size: 0.85em;
    color: var(--hops-muted);
    background: var(--hops-bg);
    padding: 2px 8px;
    border-radius: 10px;
}

/* =========================================================
   Tech App — phone-first
   ========================================================= */
.harbour-tech-app {
    max-width: 480px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--hops-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hta-header {
    background: #1a1a2e;
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.hta-logo { font-size: 1.4em; }
.hta-title { margin: 0; font-size: 1.1em; font-weight: 700; flex: 1; }
.hta-user  { font-size: 0.8em; color: #aaa; }

.hta-panel {
    padding: 16px;
    flex: 1;
}

.hta-panel--hidden { display: none !important; }

.hta-search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.hta-search-bar input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid var(--hops-border);
    border-radius: 8px;
    font-size: 1em;
    -webkit-appearance: none;
}

.hta-btn {
    display: inline-block;
    padding: 10px 18px;
    background: var(--hops-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s;
}

.hta-btn:hover    { background: var(--hops-primary-dk); }
.hta-btn--search  { background: #1a1a2e; padding: 12px 16px; }
.hta-btn--small   { padding: 5px 12px; font-size: 0.82em; }
.hta-btn--primary { background: var(--hops-primary); }
.hta-full-width   { width: 100%; margin-top: 12px; box-sizing: border-box; }

.hta-results { margin-top: 4px; }

.hta-result-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--hops-border);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.hta-result-row:hover { background: #f0f4ff; border-color: var(--hops-primary); }

.hta-result-row strong { font-size: 1em; color: var(--hops-text); }
.hta-result-row span   { font-size: 0.85em; color: var(--hops-muted); }

.hta-loading,
.hta-empty {
    text-align: center;
    padding: 24px;
    color: var(--hops-muted);
    font-size: 0.95em;
}

.hta-back-btn {
    background: none;
    border: none;
    color: var(--hops-primary);
    font-size: 0.9em;
    cursor: pointer;
    padding: 0 0 14px;
    font-weight: 600;
}

.hta-customer-card {
    background: #fff;
    border: 1px solid var(--hops-border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.hta-customer-name {
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 4px;
}

.hta-customer-meta {
    font-size: 0.9em;
    color: var(--hops-muted);
    margin-bottom: 2px;
}

.hta-customer-counts {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.hta-customer-counts span {
    font-size: 0.85em;
    color: var(--hops-muted);
    background: var(--hops-bg);
    padding: 4px 10px;
    border-radius: 10px;
}

.hta-section-title {
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hops-muted);
    margin: 16px 0 8px;
}

.hta-job-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--hops-border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.hta-job-title { flex: 1; font-size: 0.95em; font-weight: 600; min-width: 120px; }

.hta-field {
    margin-bottom: 14px;
}

.hta-field label {
    display: block;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--hops-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hta-field input,
.hta-field select,
.hta-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--hops-border);
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.hta-msg {
    margin-top: 10px;
    font-size: 0.9em;
    color: var(--hops-success);
    font-weight: 600;
}

/* =========================================================
   Home Hero Preset
   ========================================================= */
.harbour-home-hero {
    text-align: center;
    padding: 48px 24px;
}

.harbour-home-hero h2 { font-size: 2.2em; margin-bottom: 12px; }
.harbour-home-hero p  { font-size: 1.1em; color: var(--hops-muted); margin-bottom: 24px; }
.harbour-home-services h3 { font-size: 1.5em; margin-bottom: 20px; text-align: center; }

/* Blog grid */
.harbour-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.harbour-blog-card {
    background: #fff;
    border: 1px solid var(--hops-border);
    border-radius: 10px;
    overflow: hidden;
    padding: 0 0 16px;
}

.harbour-blog-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    margin-bottom: 12px;
}

.harbour-blog-card h4 { padding: 0 16px; font-size: 1em; margin-bottom: 6px; }
.harbour-blog-date   { padding: 0 16px; font-size: 0.8em; color: var(--hops-muted); margin-bottom: 6px; }
.harbour-blog-card p { padding: 0 16px; font-size: 0.9em; color: var(--hops-muted); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 600px) {
    .harbour-booking-wrap { padding: 16px; border-radius: 0; box-shadow: none; }
    .harbour-portal-tabs  { gap: 0; }
    .harbour-tab-btn      { padding: 10px 12px; font-size: 0.88em; }
    .harbour-portal-table { font-size: 0.85em; }
    .harbour-portal-table th, .harbour-portal-table td { padding: 8px 6px; }
    .harbour-invoice-card { padding: 16px; }
}
