/* =========================================================
   PLATFORMA — Service Portal Template
   Action-driven, clear, structured, premium service UX
   ========================================================= */

/* ─── 1. TOKENS ─────────────────────────────────────────── */

:root {
    --sp-bg:            #F4F6F9;
    --sp-surface:       #FFFFFF;
    --sp-text:          #1E293B;
    --sp-text-soft:     #475569;
    --sp-text-muted:    #94A3B8;
    --sp-text-faint:    #CBD5E1;
    --sp-accent:        #3B82F6;
    --sp-accent-light:  rgba(59, 130, 246, 0.08);
    --sp-accent-hover:  #2563EB;
    --sp-navy:          #1E293B;
    --sp-border:        rgba(30, 41, 59, 0.08);
    --sp-border-mid:    rgba(30, 41, 59, 0.12);
    --sp-radius:        0.625rem;
    --sp-radius-lg:     0.75rem;
    --sp-shadow:        0 1px 3px rgba(30, 41, 59, 0.06);
    --sp-shadow-md:     0 4px 12px rgba(30, 41, 59, 0.08);
    --sp-shadow-lg:     0 8px 24px rgba(30, 41, 59, 0.10);
    --sp-container:     1100px;
    --sp-section-gap:   3.5rem;
    --sp-font:          system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ─── 2. PAGE SHELL ─────────────────────────────────────── */

.sp {
    background: var(--sp-bg);
    color: var(--sp-text);
    font-family: var(--sp-font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.sp-container {
    max-width: var(--sp-container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.platforma-site-main:has(> .sp) {
    max-width: none;
    padding: 0;
}

/* ─── 3. PREVIEW BANNER ────────────────────────────────── */

.sp-preview-banner {
    background: var(--sp-navy);
    color: #fff;
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sp-preview-banner-link {
    color: rgba(255, 255, 255, 0.7);
    margin-left: 1rem;
    text-decoration: underline;
}

.sp-preview-banner-link:hover { color: #fff; }

/* ─── 4. SERVICE HERO (compact, action-focused) ────────── */

.sp-hero {
    background: var(--sp-navy);
    padding: 3rem 0;
}

.sp-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.sp-hero-content {
    flex: 1;
}

.sp-hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #FFFFFF;
    margin: 0;
}

.sp-hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.65);
    margin: 0.5rem 0 0;
    max-width: 480px;
}

.sp-hero-action {
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .sp-hero { padding: 2rem 0; }
    .sp-hero-inner { flex-direction: column; align-items: flex-start; }
    .sp-hero-title { font-size: 1.5rem; }
}

/* ─── 5. SECTIONS (shared) ─────────────────────────────── */

.sp-section {
    padding: var(--sp-section-gap) 0;
}

.sp-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.sp-section-title {
    font-size: 1.15rem;
    font-weight: 650;
    color: var(--sp-text);
    letter-spacing: -0.01em;
    margin: 0;
}

.sp-section-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--sp-accent);
    text-decoration: none;
    white-space: nowrap;
}

.sp-section-link:hover {
    text-decoration: underline;
}

/* ─── 6. SERVICE ACTIONS (primary interaction tiles) ───── */

.sp-section--actions {
    padding: 2.5rem 0 1rem;
    margin-top: -1.5rem;
    position: relative;
    z-index: 2;
}

.sp-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.sp-action-tile {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.25rem;
    background: var(--sp-surface);
    border-radius: var(--sp-radius-lg);
    border: 1px solid var(--sp-border);
    box-shadow: var(--sp-shadow-md);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.sp-action-tile:hover {
    box-shadow: var(--sp-shadow-lg);
    transform: translateY(-2px);
}

.sp-action-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--sp-radius);
    background: var(--sp-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    color: var(--sp-accent);
}

.sp-action-icon[data-icon="house"]::before    { content: "\1F3E0"; }
.sp-action-icon[data-icon="calendar"]::before  { content: "\1F4C5"; }
.sp-action-icon[data-icon="notice"]::before    { content: "\1F4CC"; }
.sp-action-icon[data-icon="users"]::before     { content: "\1F465"; }

.sp-action-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.sp-action-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--sp-text);
}

.sp-action-desc {
    font-size: 0.78rem;
    color: var(--sp-text-muted);
    line-height: 1.4;
}

.sp-action-arrow {
    flex-shrink: 0;
    color: var(--sp-text-faint);
    font-size: 1.1rem;
}

.sp-action-arrow::after {
    content: "\203A";
}

@media (max-width: 900px) {
    .sp-actions { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
    .sp-actions { grid-template-columns: 1fr; }
}

/* ─── 7. NOTICES (compact list) ────────────────────────── */

.sp-notices {
    display: flex;
    flex-direction: column;
    background: var(--sp-surface);
    border-radius: var(--sp-radius-lg);
    border: 1px solid var(--sp-border);
    box-shadow: var(--sp-shadow);
    overflow: hidden;
}

.sp-notice {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--sp-border);
    transition: background 0.1s ease;
}

.sp-notice:last-child {
    border-bottom: none;
}

.sp-notice:hover {
    background: var(--sp-accent-light);
}

.sp-notice-body {
    flex: 1;
    min-width: 0;
}

.sp-notice-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--sp-text);
    margin: 0 0 0.2rem;
    line-height: 1.35;
}

.sp-notice-link {
    color: inherit;
    text-decoration: none;
}

.sp-notice-link:hover {
    color: var(--sp-accent);
}

.sp-notice-preview {
    font-size: 0.82rem;
    color: var(--sp-text-soft);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sp-notice-date {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--sp-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

/* ─── 8. EVENTS (structured with indicators) ───────────── */

.sp-events {
    display: flex;
    flex-direction: column;
    background: var(--sp-surface);
    border-radius: var(--sp-radius-lg);
    border: 1px solid var(--sp-border);
    box-shadow: var(--sp-shadow);
    overflow: hidden;
}

.sp-event {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--sp-border);
}

.sp-event:last-child {
    border-bottom: none;
}

.sp-event-indicator {
    width: 4px;
    height: 36px;
    border-radius: 2px;
    flex-shrink: 0;
    background: var(--sp-accent);
}

.sp-event-indicator[data-category="social"]      { background: #F59E0B; }
.sp-event-indicator[data-category="meeting"]     { background: var(--sp-accent); }
.sp-event-indicator[data-category="maintenance"] { background: #10B981; }

.sp-event-date {
    display: flex;
    flex-direction: column;
    min-width: 5.5rem;
    flex-shrink: 0;
}

.sp-event-day {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sp-text);
}

.sp-event-time {
    font-size: 0.75rem;
    color: var(--sp-text-muted);
    margin-top: 0.1rem;
}

.sp-event-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.sp-event-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--sp-text);
    margin: 0;
}

.sp-event-location {
    font-size: 0.78rem;
    color: var(--sp-text-muted);
}

.sp-event-status {
    flex-shrink: 0;
}

.sp-event-spots {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--sp-text-muted);
    background: var(--sp-bg);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    white-space: nowrap;
}

@media (max-width: 500px) {
    .sp-event { flex-wrap: wrap; }
    .sp-event-date { min-width: auto; flex-direction: row; gap: 0.5rem; }
}

/* ─── 9. FACILITIES (service booking rows) ─────────────── */

.sp-facilities {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.sp-facility {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--sp-surface);
    border-radius: var(--sp-radius-lg);
    border: 1px solid var(--sp-border);
    box-shadow: var(--sp-shadow);
}

.sp-facility-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--sp-radius);
    background: var(--sp-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.sp-facility-icon[data-icon="house"]::before  { content: "\1F3E0"; }
.sp-facility-icon[data-icon="wash"]::before   { content: "\1F9FA"; }
.sp-facility-icon[data-icon="grill"]::before  { content: "\1F525"; }
.sp-facility-icon[data-icon="bed"]::before    { content: "\1F6CF"; }
.sp-facility-icon[data-icon="gym"]::before    { content: "\1F3CB"; }
.sp-facility-icon[data-icon="car"]::before    { content: "\1F697"; }

.sp-facility-body {
    flex: 1;
    min-width: 0;
}

.sp-facility-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--sp-text);
    margin: 0;
}

.sp-facility-desc {
    font-size: 0.78rem;
    color: var(--sp-text-muted);
    margin: 0.15rem 0 0;
    line-height: 1.4;
}

.sp-facility-action {
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .sp-facilities { grid-template-columns: 1fr; }
}

/* ─── 10. BUTTONS ───────────────────────────────────────── */

.sp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.35rem;
    border-radius: var(--sp-radius);
    border: 1px solid transparent;
    font-family: var(--sp-font);
    font-size: 0.88rem;
    font-weight: 550;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
    white-space: nowrap;
    line-height: 1;
}

.sp-btn--primary {
    background: var(--sp-accent);
    color: #FFFFFF;
    border-color: var(--sp-accent);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.sp-btn--primary:hover {
    background: var(--sp-accent-hover);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
}

.sp-btn--sm {
    padding: 0.4rem 1rem;
    font-size: 0.82rem;
    background: var(--sp-accent);
    color: #FFFFFF;
    border-color: var(--sp-accent);
}

.sp-btn--sm:hover {
    background: var(--sp-accent-hover);
}

.sp-btn--disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

/* ─── 11. EMPTY STATE ───────────────────────────────────── */

.sp-empty {
    text-align: center;
    color: var(--sp-text-muted);
    font-size: 0.95rem;
    padding: 3rem 0;
}

/* ─── 12. PRINT ─────────────────────────────────────────── */

@media print {
    .sp-preview-banner,
    .sp-section--actions { display: none; }
    .sp-hero { padding: 1rem 0; }
    .sp-section { padding: 1rem 0; }
}
