:root{
    --community-blue:#1877f2;
    --community-blue-dark:#166fe5;
    --community-bg:#f0f2f5;
    --community-card:#fff;
    --community-text:#1c1e21;
    --community-muted:#65676b;
    --community-line:#e4e6eb;
}
.community-home-document body{background:var(--community-bg)}
.community-page{min-height:70vh;padding:22px 0 54px;background:var(--community-bg);font-family:Inter,Poppins,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--community-text)}
.community-container{width:min(1180px,calc(100% - 24px));margin:0 auto}

/* Buscador principal: recupera la idea del buscador SOFIAPPS sin crear otro menú. */
.community-smart-search{margin-bottom:20px;padding:18px;background:#fff;border:1px solid var(--community-line);border-radius:16px;box-shadow:0 1px 3px rgba(0,0,0,.05)}
.community-search-box{display:flex;align-items:center;gap:10px;min-height:56px;padding:0 8px 0 17px;border:1px solid #ccd0d5;border-radius:14px;background:#fff;transition:.15s}
.community-search-box:focus-within{border-color:#8bb9f7;box-shadow:0 0 0 3px rgba(24,119,242,.09)}
.community-search-box>i{color:#8a8d91;font-size:17px}
.community-search-box input{min-width:0;flex:1;border:0;outline:0;background:transparent;color:#1c1e21;font-size:15px}
.community-search-box input::placeholder{color:#8a8d91}
.community-search-box button{height:42px;padding:0 20px;border:0;border-radius:10px;background:var(--community-blue);color:#fff;font-size:13px;font-weight:700}
.community-search-box button:hover{background:var(--community-blue-dark)}
.community-search-clear{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;color:#65676b;text-decoration:none;background:#f0f2f5}
.community-search-suggestions{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;margin-top:12px}
.community-search-suggestions button{min-height:54px;display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid #e4e6eb;border-radius:11px;background:#f7f8fa;color:#3a3b3c;text-align:left;font-size:11px;font-weight:700;transition:.15s}
.community-search-suggestions button:hover{background:#e7f3ff;border-color:#c8ddf8;color:#1554ad}
.community-search-suggestions i{width:29px;height:29px;border-radius:9px;display:grid;place-items:center;background:#fff;color:var(--community-blue);font-size:13px}

.community-owner-actions{display:flex;align-items:center;gap:8px;margin:0 0 18px;padding:9px 12px;background:#fff;border:1px solid var(--community-line);border-radius:12px}
.community-owner-actions>span{margin-right:auto;color:#65676b;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.community-owner-actions a{display:inline-flex;align-items:center;gap:6px;padding:8px 10px;border-radius:8px;background:#f0f2f5;color:#3a3b3c;text-decoration:none;font-size:11px;font-weight:700}
.community-owner-actions a:hover{background:#e7f3ff;color:var(--community-blue)}

.community-section{margin-top:20px}
.community-section__head{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin:0 3px 10px}
.community-section__head span{color:#8a8d91;font-size:10px;font-weight:800;letter-spacing:.09em;text-transform:uppercase}
.community-section__head h2{margin:2px 0 0;color:#1c1e21;font-size:20px;letter-spacing:-.025em}
.community-section__head>a{color:var(--community-blue);font-size:12px;font-weight:700;text-decoration:none}

.community-companies{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.community-company{min-height:145px;padding:14px;background:#fff;border:1px solid var(--community-line);border-radius:12px;box-shadow:0 1px 2px rgba(0,0,0,.03)}
.community-company__identity{display:flex;align-items:flex-start;gap:11px}.community-company__copy{min-width:0}
.community-company h3{margin:1px 0 0;color:#1c1e21;font-size:14px;font-weight:700}.community-company p{margin:3px 0 2px;color:var(--community-muted);font-size:11px}.community-company small{color:#8a8d91;font-size:10px}.community-company small i{margin-right:3px}.community-company__footer{margin-top:14px}
.community-avatar{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;overflow:hidden;background:#e7f3ff;color:var(--community-blue);flex:0 0 auto}.community-avatar img{width:100%;height:100%;object-fit:cover}.community-avatar--small{width:38px;height:38px}
.community-button{border:0;border-radius:8px;padding:10px 14px;background:var(--community-blue);color:#fff!important;font-weight:700;font-size:12px;text-decoration:none!important;display:inline-flex;align-items:center;justify-content:center;gap:7px;cursor:pointer;transition:.15s}
.community-button:hover{background:var(--community-blue-dark)}.community-button--soft{background:#e4e6eb;color:#3a3b3c!important}.community-button--soft:hover{background:#d8dadf}.community-button--compact{padding:8px 11px;font-size:11px}.community-company__footer .community-button{width:100%}

.community-reels{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(190px,220px);gap:10px;overflow-x:auto;padding-bottom:5px;scrollbar-width:thin}
.community-reel{overflow:hidden;background:#fff;border:1px solid var(--community-line);border-radius:12px;box-shadow:0 1px 2px rgba(0,0,0,.04)}.community-reel__media{position:relative;aspect-ratio:9/14;background:#111;overflow:hidden}.community-reel__media video{width:100%;height:100%;object-fit:cover}.community-reel__shade{position:absolute;inset:35% 0 0;background:linear-gradient(transparent,rgba(0,0,0,.78))}.community-reel__company{position:absolute;left:10px;right:10px;top:10px;display:flex;align-items:center;gap:8px;color:#fff}.community-reel__company span:last-child{display:flex;flex-direction:column}.community-reel__company strong{font-size:11px}.community-reel__company small{font-size:9px;color:rgba(255,255,255,.84)}.community-reel__copy{position:absolute;left:11px;right:11px;bottom:12px;color:#fff}.community-reel__copy h3{margin:0 0 4px;font-size:14px}.community-reel__copy p{margin:0;font-size:10px}.community-reel__action{padding:9px}

.community-feed{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.community-post{overflow:hidden;background:#fff;border:1px solid var(--community-line);border-radius:12px;box-shadow:0 1px 2px rgba(0,0,0,.05)}.community-post__header{display:flex;align-items:center;gap:9px;padding:12px 14px 8px}.community-post__author{min-width:0;display:flex;flex-direction:column}.community-post__author strong{font-size:12px;color:#1c1e21}.community-post__author small{font-size:10px;color:#8a8d91}.community-post__open{margin-left:auto;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#f0f2f5;color:#65676b;text-decoration:none}.community-post__body{padding:4px 14px 12px}.community-post__body h3{margin:0 0 6px;font-size:16px;color:#1c1e21}.community-post__body p{margin:0;font-size:12px;color:#3a3b3c;line-height:1.5}.community-post__image{display:block;width:100%;max-height:440px;object-fit:cover;background:#f0f2f5}.community-post__footer{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 12px 12px;border-top:1px solid #f0f2f5}.community-post__external{font-size:11px;color:#65676b;text-decoration:none;font-weight:600}.community-load-more{text-align:center;margin-top:14px}.community-empty{grid-column:1/-1;padding:24px;border:1px dashed #ccd0d5;border-radius:12px;background:#fff;color:#65676b;text-align:center;font-size:12px}
.community-search-hidden{display:none!important}

/* Gestión de empresa */
.community-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px;padding:18px;background:#fff;border:1px solid var(--community-line);border-radius:14px}.community-hero h1{margin:2px 0 4px;font-size:21px}.community-hero p{margin:0;color:#65676b;font-size:12px}.community-eyebrow{color:#8a8d91;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.07em}.community-hero__actions{display:flex;gap:8px}.community-alert{margin:12px 0;padding:12px;border-radius:9px;background:#fff3cd;color:#664d03;font-size:12px}.community-alert--error{background:#f8d7da;color:#842029}.community-users-filter{display:grid;grid-template-columns:1fr 190px auto;gap:8px;margin-bottom:12px}.community-users-filter input,.community-users-filter select,.community-publisher input,.community-publisher select,.community-publisher textarea{width:100%;border:1px solid #ccd0d5;border-radius:8px;padding:9px 10px;background:#fff;font-size:12px}.community-users-table-wrap{overflow:auto;background:#fff;border:1px solid var(--community-line);border-radius:12px}.community-users-table{width:100%;border-collapse:collapse}.community-users-table th,.community-users-table td{padding:10px 11px;border-bottom:1px solid #f0f2f5;font-size:11px;text-align:left}.community-users-table td strong,.community-users-table td small{display:block}.community-users-actions{white-space:nowrap}.community-users-actions button,.community-icon-button{width:31px;height:31px;border:0;border-radius:8px;background:#f0f2f5;color:#3a3b3c}.community-publisher{padding:16px;background:#fff;border:1px solid var(--community-line);border-radius:12px}.community-publisher__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.community-publisher label{display:flex;flex-direction:column;gap:5px;font-size:11px;font-weight:700}.community-publisher__wide{grid-column:1/-1}.community-check{flex-direction:row!important;align-items:center}.community-check input{width:auto!important}.community-publisher__actions{display:flex;align-items:center;gap:10px;margin-top:12px}.community-publisher__actions small{color:#8a8d91;font-size:10px}.community-content-list{display:grid;gap:8px}.community-content-row{display:grid;grid-template-columns:45px 1fr auto 34px;align-items:center;gap:10px;padding:10px;background:#fff;border:1px solid var(--community-line);border-radius:10px}.community-content-row__thumb{width:45px;height:45px;border-radius:8px;display:grid;place-items:center;overflow:hidden;background:#f0f2f5}.community-content-row__thumb img{width:100%;height:100%;object-fit:cover}.community-content-row__copy strong,.community-content-row__copy small{display:block}.community-content-row__copy strong{font-size:12px}.community-content-row__copy small{font-size:10px;color:#8a8d91}.community-status{display:inline-flex;padding:5px 8px;border-radius:999px;background:#f0f2f5;font-size:9px;font-weight:800}.community-status--aprobado{background:#e7f7e3;color:#2e7d32}.community-status--bloqueado{background:#fde7e7;color:#b42318}.community-status--pendiente{background:#fff4cf;color:#8a6500}.community-status--rechazado,.community-status--revocado{background:#f0f2f5;color:#65676b}

@media(max-width:1050px){.community-search-suggestions{grid-template-columns:repeat(3,minmax(0,1fr))}.community-companies{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.community-page{padding-top:14px}.community-search-suggestions{grid-template-columns:repeat(2,minmax(0,1fr))}.community-companies{grid-template-columns:repeat(2,minmax(0,1fr))}.community-feed{grid-template-columns:1fr}.community-users-filter{grid-template-columns:1fr}.community-hero{align-items:flex-start;flex-direction:column}.community-publisher__grid{grid-template-columns:1fr}.community-publisher__wide{grid-column:auto}}
@media(max-width:480px){.community-container{width:min(100% - 14px,1180px)}.community-smart-search{padding:11px;border-radius:12px}.community-search-box{min-height:50px;padding-left:12px}.community-search-box button{height:38px;padding:0 13px}.community-search-suggestions{display:flex;overflow-x:auto;gap:7px}.community-search-suggestions button{flex:0 0 auto;min-height:42px;padding:7px 10px}.community-search-suggestions button i{width:26px;height:26px}.community-companies{grid-template-columns:1fr}.community-company{min-height:auto}.community-owner-actions>span{display:none}}

/* Buscador SOFIAPPS: 8 sugerencias equilibradas en 2 filas de 4. */
.sofia-assistant .sofia-suggestions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:12px}
.sofia-assistant .sofia-suggestion{width:100%;min-width:0;min-height:60px;margin:0;padding:10px 12px;display:flex;align-items:center;justify-content:flex-start;gap:10px;border:1px solid #e4e6eb;border-radius:11px;background:#f7f8fa;color:#3a3b3c;text-align:left;transition:.15s}
.sofia-assistant .sofia-suggestion:hover{background:#eef5ff;border-color:#c8ddf8;color:#1554ad}
.sofia-assistant .sofia-suggestion__icon{width:31px;height:31px;flex:0 0 31px;border-radius:9px;display:grid;place-items:center;background:#fff;color:var(--community-blue);font-size:13px}
.sofia-assistant .sofia-suggestion strong{display:block;font-size:12px;font-weight:700;line-height:1.25;white-space:normal}
@media(max-width:900px){.sofia-assistant .sofia-suggestions{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.sofia-assistant .sofia-suggestions{display:flex;overflow-x:auto;gap:7px;padding-bottom:3px}.sofia-assistant .sofia-suggestion{flex:0 0 auto;min-height:44px;padding:7px 10px}.sofia-assistant .sofia-suggestion strong{font-size:11px}}

/* ============================================================================
   AGENDA PÚBLICA DE LA FICHA DE EMPRESA
   Días y horarios vienen resueltos del planner; aquí solo se presentan.
   ============================================================================ */

.sf-agenda {
    width: min(100%, 880px);
    margin-inline: auto;
    padding-block: clamp(40px, 4vw, 64px);
}

.sf-agenda__form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sf-agenda__days {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.sf-agenda__day {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 58px;
    padding: 10px 0;
    border: 0;
    border-radius: 14px;
    background: #f4f5f6;
    color: #161616;
    font-weight: 800;
    cursor: pointer;
    transition: background-color .16s ease, color .16s ease;
}

.sf-agenda__day.is-active {
    background: #001391;
    color: #fff;
}

.sf-agenda__day-num {
    font-size: 18px;
    line-height: 1;
}

.sf-agenda__day-free {
    font-size: 11px;
    font-weight: 700;
    opacity: .7;
}

.sf-agenda__slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sf-agenda__slot {
    padding: 9px 14px;
    border: 0;
    border-radius: 999px;
    background: #f4f5f6;
    color: #161616;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .16s ease, color .16s ease;
}

.sf-agenda__slot:hover,
.sf-agenda__slot:focus-visible {
    background: #ff7f00;
    color: #fff;
}

.sf-agenda__slot.is-active {
    background: #001391;
    color: #fff;
}

.sf-agenda__fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

.sf-agenda__fields :is(input, select) {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border: 0;
    border-radius: 14px;
    background: #f4f5f6;
    color: #161616;
    font: inherit;
}

.sf-agenda__fields :is(input, select):focus-visible {
    outline: 3px solid rgba(255, 127, 0, .38);
    outline-offset: 2px;
}

.sf-agenda .sf-main-btn {
    align-self: center;
    min-height: 48px;
    padding: 12px 26px;
}

.sf-agenda__feedback {
    margin: 0;
    text-align: center;
    font-weight: 700;
}

.sf-agenda__feedback.is-error {
    color: #c0392b;
}

.sf-agenda__empty {
    margin: 0;
    text-align: center;
}
