/**
 * Premium Styles - Acessos Module
 * Estilos compartilhados para todos os módulos de acessos (sócios, empresas, escritórios)
 */

:root {
    --premium-primary: #667eea;
    --premium-primary-dark: #764ba2;
    --premium-success: #2dce89;
    --premium-warning: #fb6340;
    --premium-warning-light: #f5a623;
    --premium-danger: #f5365c;
    --premium-info: #11cdef;
    --premium-dark: #344767;
    --premium-muted: #8898aa;
    --premium-light: #f8f9fe;
    --premium-border: #e9ecef;
    --premium-shadow: 0 2px 12px rgba(0,0,0,0.08);
    --premium-shadow-hover: 0 4px 20px rgba(0,0,0,0.12);
    --premium-radius: 12px;
    --premium-radius-sm: 8px;
    --premium-radius-lg: 20px;
    --premium-transition: all 0.3s ease;
}

/* ============================================
   CARDS
   ============================================ */

.premium-card {
    background: #fff;
    border-radius: var(--premium-radius);
    box-shadow: var(--premium-shadow);
    overflow: visible;
    border: none;
    transition: var(--premium-transition);
}

.premium-card:hover {
    box-shadow: var(--premium-shadow-hover);
}

.premium-card .card-header {
    background: linear-gradient(135deg, var(--premium-primary) 0%, var(--premium-primary-dark) 100%);
    color: #fff;
    padding: 1.25rem 1.5rem;
    border: none;
    border-radius: var(--premium-radius) var(--premium-radius) 0 0;
}

.premium-card .card-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.premium-card .card-header .header-subtitle {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-top: 0.25rem;
}

.premium-card > .card-body {
    padding: 0;
    border-radius: 0 0 var(--premium-radius) var(--premium-radius);
    background: #fff;
}

/* ============================================
   TABLES
   ============================================ */

.premium-table {
    margin-bottom: 0;
}

.premium-table thead th {
    background: var(--premium-light);
    border-bottom: 2px solid var(--premium-border);
    color: var(--premium-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem 1.25rem;
    white-space: nowrap;
}

.premium-table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f5;
    color: #525f7f;
    font-size: 0.9rem;
}

.premium-table tbody tr {
    transition: var(--premium-transition);
}

.premium-table tbody tr:hover {
    background: var(--premium-light);
}

.premium-table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   LIST ITEMS
   ============================================ */

.premium-list-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f3f5;
    transition: var(--premium-transition);
    gap: 1rem;
}

.premium-list-item:hover {
    background: var(--premium-light);
}

.premium-list-item:last-child {
    border-bottom: none;
}

.list-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.list-item-icon.icon-success {
    background: rgba(45, 206, 137, 0.12);
    color: var(--premium-success);
}

.list-item-icon.icon-warning {
    background: rgba(251, 99, 64, 0.12);
    color: var(--premium-warning);
}

.list-item-icon.icon-danger {
    background: rgba(245, 54, 92, 0.12);
    color: var(--premium-danger);
}

.list-item-icon.icon-info {
    background: rgba(17, 205, 239, 0.12);
    color: var(--premium-info);
}

.list-item-icon.icon-primary {
    background: rgba(94, 114, 228, 0.12);
    color: var(--premium-primary);
}

.list-item-content {
    flex: 1;
    min-width: 0;
}

.list-item-title {
    font-weight: 600;
    color: var(--premium-dark);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.list-item-subtitle {
    font-size: 0.8rem;
    color: var(--premium-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.list-item-subtitle span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.list-item-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.list-item-actions {
    flex-shrink: 0;
}

/* ============================================
   BADGES
   ============================================ */

.premium-badge {
    padding: 0.4rem 0.75rem;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.premium-badge i {
    font-size: 0.6rem;
}

.premium-badge.badge-success-soft {
    background: rgba(45, 206, 137, 0.15);
    color: var(--premium-success);
}

.premium-badge.badge-warning-soft {
    background: rgba(251, 182, 64, 0.15);
    color: var(--premium-warning-light);
}

.premium-badge.badge-danger-soft {
    background: rgba(245, 54, 92, 0.15);
    color: var(--premium-danger);
}

.premium-badge.badge-primary-soft {
    background: rgba(94, 114, 228, 0.15);
    color: var(--premium-primary);
}

.premium-badge.badge-info-soft {
    background: rgba(17, 205, 239, 0.15);
    color: var(--premium-info);
}

/* Counter/Total Badge (header) */
.counter-badge,
.total-badge {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.8rem;
}

.total-badge i {
    color: var(--premium-success);
}

/* ============================================
   BUTTONS
   ============================================ */

.premium-btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--premium-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--premium-transition);
    border: none;
    cursor: pointer;
}

.premium-btn-primary {
    background: linear-gradient(135deg, var(--premium-primary) 0%, var(--premium-primary-dark) 100%);
    color: #fff;
}

.premium-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(94, 114, 228, 0.4);
    color: #fff;
}

.premium-btn-success {
    background: linear-gradient(135deg, var(--premium-success) 0%, #24a46d 100%);
    color: #fff;
}

.premium-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 206, 137, 0.4);
    color: #fff;
}

/* Action Button (dropdown trigger) */
.premium-action-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--premium-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--premium-light);
    border: 1px solid var(--premium-border);
    color: var(--premium-muted);
    transition: var(--premium-transition);
}

.premium-action-btn:hover {
    background: var(--premium-primary);
    border-color: var(--premium-primary);
    color: #fff;
}

/* Load More Button */
.btn-load-more {
    padding: 0.75rem 2rem;
    border-radius: var(--premium-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--premium-primary) 0%, var(--premium-primary-dark) 100%);
    border: none;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--premium-transition);
}

.btn-load-more:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(94, 114, 228, 0.4);
    color: #fff;
}

.btn-load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-load-more .spinner-border {
    width: 1rem;
    height: 1rem;
}

.load-more-container {
    padding: 1.5rem;
    text-align: center;
    background: var(--premium-light);
    border-top: 1px solid var(--premium-border);
}

/* ============================================
   DROPDOWNS
   ============================================ */

.premium-dropdown-menu {
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 10px;
    padding: 0.5rem;
    z-index: 1050;
}

.premium-dropdown-menu .dropdown-item {
    border-radius: 6px;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    color: #525f7f;
    transition: var(--premium-transition);
}

.premium-dropdown-menu .dropdown-item:hover {
    background: var(--premium-light);
    color: var(--premium-primary);
}

.premium-dropdown-menu .dropdown-item i,
.premium-dropdown-menu .dropdown-item span.fas,
.premium-dropdown-menu .dropdown-item span.far {
    width: 20px;
    margin-right: 0.5rem;
    text-align: center;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    padding: 4rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-state-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--premium-light) 0%, var(--premium-border) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    color: var(--premium-muted);
}

.empty-state h4,
.empty-state h5 {
    color: var(--premium-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #7b809a;
    margin: 0;
    font-size: 0.95rem;
}

/* ============================================
   VALUE CELLS
   ============================================ */

.value-cell {
    font-weight: 600;
    color: var(--premium-dark);
}

.value-cell.paid,
.value-cell.success {
    color: var(--premium-success);
}

.value-cell.danger {
    color: var(--premium-danger);
}

/* Info Cell */
.info-cell {
    display: flex;
    flex-direction: column;
}

.info-cell-main {
    font-weight: 600;
    color: var(--premium-dark);
}

.info-cell-sub {
    font-size: 0.8rem;
    color: var(--premium-muted);
}

/* ============================================
   DATATABLES CUSTOMIZATION
   ============================================ */

.dataTables_wrapper .dataTables_filter input {
    border-radius: var(--premium-radius-sm);
    border: 1px solid var(--premium-border);
    padding: 0.5rem 1rem;
}

.dataTables_wrapper .dataTables_length select {
    border-radius: var(--premium-radius-sm);
    border: 1px solid var(--premium-border);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: var(--premium-radius-sm) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, var(--premium-primary) 0%, var(--premium-primary-dark) 100%) !important;
    border-color: transparent !important;
    color: #fff !important;
}

/* ============================================
   MODALS
   ============================================ */

.premium-modal .modal-content {
    border: none;
    border-radius: var(--premium-radius-lg);
    overflow: hidden;
}

.premium-modal .modal-header {
    background: linear-gradient(135deg, var(--premium-primary) 0%, var(--premium-primary-dark) 100%);
    border: none;
    padding: 1.25rem 1.5rem;
    color: #fff;
}

.premium-modal .modal-header .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.premium-modal .modal-header .close,
.premium-modal .modal-header .close-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--premium-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.premium-modal .modal-header .close:hover,
.premium-modal .modal-header .close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* ============================================
   VIDEO SPECIFIC
   ============================================ */

.video-card {
    background: #fff;
    border-radius: var(--premium-radius-lg);
    overflow: hidden;
    box-shadow: var(--premium-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: linear-gradient(135deg, var(--premium-primary) 0%, var(--premium-primary-dark) 100%);
    cursor: pointer;
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-thumbnail:hover img {
    transform: scale(1.1);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.3) 50%,
        rgba(0,0,0,0.7) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-thumbnail:hover .video-overlay {
    opacity: 1;
}

.play-button {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #ff0000;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    animation: pulse 2s infinite;
}

.video-thumbnail:hover .play-button {
    transform: scale(1.15);
    background: #ff0000;
    color: white;
    animation: none;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 30px rgba(255, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 8px 40px rgba(255, 0, 0, 0.5);
    }
}

.video-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--premium-dark);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

.video-desc {
    font-size: 0.875rem;
    color: #718096;
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.video-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.video-date {
    font-size: 0.875rem;
    color: #a0aec0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-watch {
    background: linear-gradient(135deg, var(--premium-primary) 0%, var(--premium-primary-dark) 100%);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-watch:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* ============================================
   SELECT2 PREMIUM
   ============================================ */

.select2-container--default .select2-selection--single {
    border-radius: var(--premium-radius-sm);
    border: 1px solid var(--premium-border);
    height: calc(1.5em + 1rem + 2px);
    padding: 0.375rem 0.75rem;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.75;
    padding-left: 0;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: calc(1.5em + 1rem);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: linear-gradient(135deg, var(--premium-primary) 0%, var(--premium-primary-dark) 100%);
}

.select2-dropdown {
    border-radius: var(--premium-radius-sm);
    border: 1px solid var(--premium-border);
    box-shadow: var(--premium-shadow);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .premium-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .list-item-badges {
        width: 100%;
    }

    .list-item-actions {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    .premium-card .card-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start !important;
    }

    .counter-badge,
    .total-badge {
        align-self: flex-start;
    }

    .play-button {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .video-title {
        font-size: 1rem;
    }
}
