/* Estilos personalizados */
body {
    font-family: 'Figtree', sans-serif;
    background-color: #f8f9fa;
    color: #16202a;
}

.main-container {
    min-height: 100vh;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn {
    border-radius: 12px !important;
}

.card {
    border-radius: 0.75rem;
}

.card-header {
    border-bottom: 1px solid #eef1f4;
}

.table th {
    font-weight: 600;
    font-size: 0.9rem;
    color: #5b6573;
}

.cp-shell {
    min-height: 100vh;
    display: flex;
    background: radial-gradient(circle at 10% 10%, #f2f7ff 0%, #eef2f7 45%, #f7f9fb 100%);
}

.cp-sidebar {
    width: 270px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #0f172a 0%, #111f3d 100%);
    color: #d9e3f0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    transition: width 0.22s ease;
}

.cp-sidebar__brand {
    height: 72px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 22px;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cp-sidebar__brand-text {
    white-space: nowrap;
}

.cp-sidebar__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22d3ee;
    box-shadow: 0 0 0 6px rgba(34, 211, 238, 0.18);
}

.cp-nav {
    padding: 18px 12px;
}

.cp-nav__section {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 14px 10px 8px;
    color: #7f93ae;
}

.cp-nav__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 10px;
    color: #cfdaea;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 6px;
}

.cp-nav__link i {
    font-size: 1.08rem;
    width: 22px;
    text-align: center;
}

.cp-nav__text {
    white-space: nowrap;
}

.cp-nav__badge {
    margin-left: auto;
    background: #0ea5e9;
    color: #042f4a;
    border-radius: 999px;
    font-size: 0.68rem;
    line-height: 1;
    font-weight: 700;
    padding: 0.22rem 0.42rem;
}

.cp-nav__link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.09);
}

.cp-nav__link.is-active {
    color: #0f172a;
    background: #e2e8f0;
}

.cp-sidebar__footer {
    margin-top: auto;
    padding: 14px 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.cp-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
    padding: 12px 12px;
    border-radius: 10px;
    color: #ffffff;
    text-decoration: none;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.28), rgba(251, 113, 133, 0.28));
    border: 1px solid rgba(252, 165, 165, 0.25);
}

.cp-logout:hover {
    color: #fff7f7;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.36), rgba(251, 113, 133, 0.36));
}

.cp-logout__text {
    white-space: nowrap;
}

.cp-main {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cp-topbar {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e7edf3;
}

.cp-topbar__controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cp-topbar__title {
    font-weight: 700;
    color: #0f172a;
}

.cp-topbar__user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-weight: 500;
}

.cp-content {
    padding: 24px;
}

.cp-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-color: #d7dee7;
    color: #334155;
}

.cp-sidebar-toggle--mobile {
    display: none;
}

.cp-shell.sidebar-collapsed .cp-sidebar {
    width: 86px;
}

.cp-shell.sidebar-collapsed .cp-sidebar__brand {
    justify-content: center;
    padding: 0;
}

.cp-shell.sidebar-collapsed .cp-sidebar__brand-text,
.cp-shell.sidebar-collapsed .cp-nav__section,
.cp-shell.sidebar-collapsed .cp-nav__text,
.cp-shell.sidebar-collapsed .cp-nav__badge,
.cp-shell.sidebar-collapsed .cp-logout__text {
    display: none;
}

.cp-shell.sidebar-collapsed .cp-nav__link,
.cp-shell.sidebar-collapsed .cp-logout {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.cp-shell.sidebar-collapsed .cp-nav__link i,
.cp-shell.sidebar-collapsed .cp-logout i {
    margin: 0;
}

@media (max-width: 991.98px) {
    .cp-sidebar {
        position: fixed;
        z-index: 1040;
        inset: 0 auto 0 0;
        transform: translateX(-100%);
        transition: transform 0.22s ease;
    }

    .cp-shell.sidebar-open .cp-sidebar {
        transform: translateX(0);
    }

    .cp-sidebar-toggle--desktop {
        display: none;
    }

    .cp-sidebar-toggle--mobile {
        display: inline-flex;
    }

    .cp-topbar {
        padding: 0 14px;
        height: 60px;
    }

    .cp-topbar__title,
    .cp-topbar__user {
        display: none !important;
    }

    .cp-content {
        padding: 14px;
    }
}

.cp-community-card {
    border: 1px solid #e7edf3;
}

.cp-community-card .card-body {
    padding: 1rem 1.1rem;
}

.cp-community-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem 0.9rem;
}

.cp-community-meta div {
    color: #3c4b5f;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cp-community-meta i {
    color: #64748b;
    margin-right: 0.35rem;
}

.cp-billing-badge {
    background: #e7f8ee;
    color: #0e7c3a;
    border: 1px solid #c8f0d7;
}

.modal .modal-content {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.2);
}

.modal .modal-header,
.modal .modal-footer {
    border-color: #edf2f7;
}

.modal .form-label {
    color: #8b98ad;
    text-transform: uppercase;
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
    font-weight: 700;
}

.modal .form-control,
.modal .form-select {
    border-radius: 0.75rem;
    border-color: #d8e0ea;
    min-height: 2.85rem;
}

.cp-community-modal .modal-dialog {
    max-width: 760px;
}

.cp-community-modal .modal-dialog.modal-dialog-scrollable {
    height: 98vh;
    max-height: 98vh;
    margin-top: 1vh;
    margin-bottom: 1vh;
}

.cp-community-modal .modal-content {
    border-radius: 1.1rem;
    background: #ffffff;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cp-community-form {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.cp-community-modal .modal-header {
    padding: 1.25rem 2.15rem 1rem;
}

.cp-community-modal .modal-body {
    padding: 0.75rem 2.15rem 2rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.cp-community-modal .modal-dialog-scrollable .modal-body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.cp-community-modal .modal-body::-webkit-scrollbar,
.cp-community-modal .modal-dialog-scrollable .modal-body::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none;
    background: transparent;
}

.cp-community-modal .modal-footer {
    padding: 0.95rem 2.15rem 1.35rem;
    background: #ffffff;
    border-top: 1px solid #edf2f7;
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
    position: relative;
    z-index: 1;
}

.cp-community-form .row > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

.cp-community-form .form-label {
    min-height: 1.35rem;
    display: flex;
    align-items: center;
}

.cp-community-form .form-label small {
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.76rem;
    margin-left: 0.25rem;
    font-weight: 500;
}

.cp-community-form .form-control,
.cp-community-form .form-select {
    background: #fdfefe;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
    padding-top: 0.56rem;
    padding-bottom: 0.56rem;
    font-size: 0.98rem;
}

.cp-community-form .form-control:focus,
.cp-community-form .form-select:focus {
    border-color: #9db5ff;
    box-shadow: 0 0 0 0.2rem rgba(59, 97, 245, 0.14);
}

.cp-community-form .modal-footer .btn {
    min-width: 160px;
    border-radius: 0.72rem;
}

.cp-community-form .modal-footer .btn.btn-primary {
    min-width: 220px;
    background: linear-gradient(90deg, #4a48db 0%, #5a4ff0 100%);
    border-color: #4f4ae2;
    font-weight: 700;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(76, 70, 233, 0.25);
}

.cp-community-form .modal-footer .btn.btn-outline-secondary {
    color: #4b5563;
    border-color: #d2d9e3;
    background: #ffffff;
}

.cp-community-form .modal-footer .btn.btn-outline-secondary:hover {
    color: #1f2937;
    background: #f8fafc;
}

.cp-field-panel {
    background: #f6f8fb;
    border: 1px solid #e8eef5;
    border-radius: 0.9rem;
    padding: 0.95rem 1rem 1rem;
}

.cp-field-panel__title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    color: #273548;
    margin-bottom: 0.75rem;
}

.cp-field-panel__title i {
    color: #546a85;
}

@media (max-width: 767.98px) {
    .cp-community-meta {
        grid-template-columns: 1fr;
    }

    .cp-community-modal .modal-header,
    .cp-community-modal .modal-body,
    .cp-community-modal .modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .cp-community-form .modal-footer .btn.btn-primary {
        min-width: 0;
        width: 100%;
    }

    .cp-community-form .modal-footer .btn.btn-outline-secondary {
        width: 100%;
    }

    .cp-community-modal .modal-dialog.modal-dialog-scrollable {
        height: 96vh;
        max-height: 96vh;
        margin: 0.5rem;
    }

    .cp-community-modal .modal-content {
        height: 100%;
        max-height: 100%;
    }
}
