/* ============================================
   Admin User Management Styles - Hubionis Theme
   ============================================ */

.admin-user-management-section {
    padding: 2rem;
    background: transparent;
    min-height: auto;
    margin-top: 2rem;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(31, 85, 85, 0.6), rgba(15, 42, 42, 0.4));
    border-radius: 16px;
    border: 1px solid rgba(127, 255, 0, 0.15);
    backdrop-filter: blur(10px);
}

.section-header h2 {
    font-size: 2rem;
    color: #fff;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(127, 255, 0, 0.3);
    background: linear-gradient(135deg, #7FFF00, #6DE800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-header h2::before {
    content: '👥';
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(127, 255, 0, 0.5));
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.btn-export,
.btn-refresh {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-export svg,
.btn-refresh svg {
    transition: transform 0.3s ease;
}

.btn-export:hover svg {
    transform: translateY(2px);
}

.btn-refresh:hover svg {
    transform: rotate(180deg);
}

.btn-export {
    background: linear-gradient(135deg, #7FFF00 0%, #6DE800 100%);
    color: #0A1A1A;
    font-weight: 600;
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(127, 255, 0, 0.4);
}

.btn-refresh {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-refresh:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Filters Bar */
.filters-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background: rgba(31, 85, 85, 0.4);
    padding: 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(127, 255, 0, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.filter-group label {
    color: #999;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-group select,
.filter-group input {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: rgba(127, 255, 0, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(127, 255, 0, 0.1);
}

.search-group {
    flex: 2;
}

.search-group input {
    width: 100%;
}

.search-group input::placeholder {
    color: #666;
}

/* Statistics Cards */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(31, 85, 85, 0.6), rgba(15, 42, 42, 0.4));
    border: 1px solid rgba(127, 255, 0, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(127, 255, 0, 0.3);
    border-color: rgba(127, 255, 0, 0.3);
}

.stat-icon {
    font-size: 2.5rem;
    line-height: 1;
    filter: drop-shadow(0 0 10px rgba(127, 255, 0, 0.5));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    display: block;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #999;
    font-size: 0.9rem;
}

/* Users Table */
.users-table-container {
    background: rgba(31, 85, 85, 0.4);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid rgba(127, 255, 0, 0.15);
    backdrop-filter: blur(10px);
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table thead {
    background: linear-gradient(135deg, rgba(127, 255, 0, 0.1), rgba(109, 232, 0, 0.05));
}

.users-table th {
    padding: 1rem;
    text-align: left;
    color: #7FFF00;
    font-weight: 600;
    border-bottom: 2px solid rgba(127, 255, 0, 0.2);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.users-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #ccc;
}

.user-row {
    transition: all 0.2s ease;
}

.user-row:hover {
    background: rgba(127, 255, 0, 0.05);
}

/* User Avatar */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initials {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7FFF00, #6DE800);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0A1A1A;
    font-weight: bold;
    font-size: 0.9rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-info strong {
    color: #fff;
    font-size: 0.95rem;
}

.user-info small {
    color: #999;
    font-size: 0.85rem;
}

.user-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
}

/* Badges */
.role-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
    display: inline-block;
}

.role-badge.admin {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: #fff;
}

.role-badge.organizer {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: #fff;
}

.role-badge.speaker {
    background: linear-gradient(135deg, #f7b731, #fa8231);
    color: #fff;
}

.role-badge.attendee {
    background: linear-gradient(135deg, #5f27cd, #341f97);
    color: #fff;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
    display: inline-block;
}

.status-badge.active {
    background: rgba(46, 213, 115, 0.2);
    color: #2ed573;
    border: 1px solid #2ed573;
}

.status-badge.pending {
    background: rgba(255, 159, 67, 0.2);
    color: #ff9f43;
    border: 1px solid #ff9f43;
}

.status-badge.suspended {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    border: 1px solid #ff6b6b;
}

.status-badge.deleted {
    background: rgba(153, 153, 153, 0.2);
    color: #999;
    border: 1px solid #999;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: rgba(127, 255, 0, 0.1);
    border: 1px solid rgba(127, 255, 0, 0.2);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    color: #7FFF00;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(127, 255, 0, 0.2);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(127, 255, 0, 0.3);
}

.btn-icon.delete-user:hover {
    background: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination-info {
    color: #999;
    font-size: 0.9rem;
}

.pagination-buttons {
    display: flex;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(127, 255, 0, 0.1);
    border-color: rgba(127, 255, 0, 0.5);
}

.pagination-btn.active {
    background: linear-gradient(135deg, #7FFF00, #6DE800);
    border-color: transparent;
    color: #0A1A1A;
    font-weight: 600;
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-ellipsis {
    color: #999;
    padding: 0.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    z-index: 1;
}

.modal-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    max-height: 90vh;
    width: 90%;
    background: linear-gradient(135deg, rgba(10, 26, 26, 0.98) 0%, rgba(15, 42, 42, 0.98) 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(127, 255, 0, 0.3);
    backdrop-filter: blur(20px);
}

.modal-content-inner {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(90vh - 4rem);
}

/* Custom Scrollbar - Hubionis Style */
.modal-content-inner::-webkit-scrollbar {
    width: 8px;
}

.modal-content-inner::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.modal-content-inner::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7FFF00 0%, #6DE800 100%);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.modal-content-inner::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #8FFF10 0%, #7DE810 100%);
    box-shadow: 0 0 10px rgba(127, 255, 0, 0.5);
}

/* Firefox Scrollbar */
.modal-content-inner {
    scrollbar-width: thin;
    scrollbar-color: #7FFF00 rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

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

/* User Detail Modal */
.user-detail-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(127, 255, 0, 0.5);
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(127, 255, 0, 0.3);
}

.user-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initials-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7FFF00, #6DE800);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0A1A1A;
    font-weight: bold;
    font-size: 2.5rem;
    box-shadow: 0 0 30px rgba(127, 255, 0, 0.4);
}

.user-detail-info {
    flex: 1;
}

.user-detail-info h2 {
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.user-detail-info p {
    color: #999;
    margin-bottom: 1rem;
}

.user-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Tabs */
.user-detail-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.25rem;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-weight: 600;
    white-space: nowrap;
    font-size: 0.95rem;
}

.tab-btn:hover {
    color: #ccc;
}

.tab-btn.active {
    color: #7FFF00;
    border-bottom-color: #7FFF00;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Overview Grid */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-card h4 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 1rem;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    color: #999;
    font-weight: 500;
}

.info-row .value {
    color: #fff;
    font-weight: 500;
    text-align: right;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(127, 255, 0, 0.08) 0%, rgba(127, 255, 0, 0.03) 100%);
    border-radius: 12px;
    border: 1px solid rgba(127, 255, 0, 0.3);
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: rgba(127, 255, 0, 0.5);
    background: linear-gradient(135deg, rgba(127, 255, 0, 0.12) 0%, rgba(127, 255, 0, 0.05) 100%);
    transform: translateY(-2px);
}

.stat-item .stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #7FFF00;
    display: block;
    margin-bottom: 0.5rem;
}

/* Dim zero values */
.stat-item.stat-zero {
    opacity: 0.5;
    background: linear-gradient(135deg, rgba(127, 255, 0, 0.03) 0%, rgba(127, 255, 0, 0.01) 100%);
    border-color: rgba(127, 255, 0, 0.15);
}

.stat-item.stat-zero:hover {
    opacity: 0.7;
    transform: none;
}

.stat-item .stat-value:has-text('0') {
    opacity: 0.4;
}

.stat-item .stat-label {
    color: #999;
    font-size: 0.9rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #999;
    font-size: 1.1rem;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 3rem;
    color: #7FFF00;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(127, 255, 0, 0.1);
    border-top-color: #7FFF00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Events & Tickets Lists */
.events-list,
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-item,
.ticket-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.event-info,
.ticket-info {
    flex: 1;
}

.event-info h4,
.ticket-info h4 {
    color: #fff;
    margin-bottom: 0.5rem;
}

.event-info p {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.event-meta,
.ticket-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #999;
}

.event-actions .btn-small {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #7FFF00, #6DE800);
    color: #0A1A1A;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.event-actions .btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 255, 0, 0.4);
}

.ticket-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #7FFF00;
}

/* Activity Timeline */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid rgba(127, 255, 0, 0.5);
}

.activity-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-action {
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.activity-details {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.activity-time {
    color: #666;
    font-size: 0.85rem;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: #999;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(127, 255, 0, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(127, 255, 0, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Modal Actions */
.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary,
.btn-primary {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    text-align: center;
}

.btn-secondary {
    background: rgba(255, 77, 77, 0.15);
    color: #ff6b6b;
    border: 1px solid rgba(255, 77, 77, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 77, 77, 0.25);
    border-color: rgba(255, 77, 77, 0.5);
    color: #ff8787;
}

.btn-primary {
    background: linear-gradient(135deg, #7FFF00, #6DE800);
    color: #0A1A1A;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(127, 255, 0, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(127, 255, 0, 0.4);
}

/* Toast Notifications */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .admin-user-management-section {
        padding: 1rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .filters-bar {
        flex-direction: column;
    }

    .admin-stats-grid {
        grid-template-columns: 1fr;
    }

    .users-table-container {
        overflow-x: auto;
    }

    .users-table {
        font-size: 0.85rem;
    }

    .users-table th,
    .users-table td {
        padding: 0.5rem;
    }

    .user-info strong {
        font-size: 0.85rem;
    }

    .user-info small {
        font-size: 0.75rem;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }

    .user-detail-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .user-detail-header {
        flex-direction: column;
        text-align: center;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .pagination {
        flex-direction: column;
        gap: 1rem;
    }

    .pagination-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 1.5rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-icon {
        font-size: 2rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .user-avatar-large,
    .avatar-initials-large {
        width: 80px;
        height: 80px;
        font-size: 1.8rem;
    }
}

/* ==========================================
   AI SUBSCRIPTION TAB
   ========================================== */

.ai-sub-empty {
    text-align: center;
    padding: 3rem 2rem;
}
.ai-sub-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.ai-sub-empty h3 {
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}
.ai-sub-empty p {
    color: #94a3b8;
    margin-bottom: 1.5rem;
}
.ai-sub-assign {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.ai-sub-assign label {
    color: #cbd5e1;
    font-weight: 600;
}
.ai-sub-assign select {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: #e2e8f0;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

/* Sub Panel */
.ai-sub-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Header */
.ai-sub-header {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(96, 165, 250, 0.15);
    border-radius: 12px;
    padding: 1.25rem;
}
.ai-sub-plan-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.ai-sub-plan-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ai-sub-plan-badge.plan-starter {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.3);
}
.ai-sub-plan-badge.plan-pro {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}
.ai-sub-plan-badge.plan-enterprise {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}
.ai-sub-status {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}
.ai-sub-status.status-active {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}
.ai-sub-status.status-warning {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}
.ai-sub-status.status-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}
.ai-sub-price {
    color: #22c55e;
    font-weight: 700;
    font-size: 1.1rem;
    margin-left: auto;
}
.ai-sub-period {
    color: #94a3b8;
    font-size: 0.85rem;
}
.ai-sub-stripe {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}
.ai-sub-stripe .mono,
.mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}
.ai-sub-grace-warning {
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #eab308;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}
.ai-sub-dunning {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-top: 0.75rem;
}

/* Usage Meters */
.ai-sub-usage h4,
.ai-sub-actions h4,
.ai-sub-history h4,
.ai-sub-details h4 {
    color: #e2e8f0;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}
.ai-usage-meters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.ai-usage-meter-label {
    display: flex;
    justify-content: space-between;
    color: #cbd5e1;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}
.ai-usage-meter-track {
    width: 100%;
    height: 8px;
    background: rgba(148, 163, 184, 0.15);
    border-radius: 4px;
    overflow: hidden;
}
.ai-usage-meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #60a5fa, #818cf8);
    border-radius: 4px;
    transition: width 0.3s ease;
}
.ai-usage-meter-fill.warning {
    background: linear-gradient(90deg, #eab308, #f59e0b);
}
.ai-usage-meter-fill.danger {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

/* Actions Grid */
.ai-sub-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.ai-sub-action-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 10px;
    padding: 1rem;
}
.ai-sub-action-card h5 {
    color: #cbd5e1;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ai-sub-action-card select,
.ai-sub-action-card input {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(96, 165, 250, 0.25);
    color: #e2e8f0;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}
.ai-sub-action-card input:focus,
.ai-sub-action-card select:focus {
    border-color: #60a5fa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.15);
}
.ai-sub-limits-form {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}
.ai-limit-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.ai-limit-row label {
    color: #94a3b8;
    font-size: 0.8rem;
    min-width: 90px;
}
.ai-limit-row input {
    flex: 1;
    margin-bottom: 0;
}
.ai-sub-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Action Buttons */
.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    border: none;
    transition: all 0.2s;
    width: 100%;
}
.btn-primary.btn-sm {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff;
}
.btn-primary.btn-sm:hover {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    transform: translateY(-1px);
}
.btn-warning.btn-sm {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.3);
}
.btn-warning.btn-sm:hover {
    background: rgba(234, 179, 8, 0.25);
}
.btn-danger.btn-sm {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger.btn-sm:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* Usage History Stats */
.ai-sub-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}
.ai-sub-stat {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 10px;
    padding: 0.75rem;
    text-align: center;
}
.ai-sub-stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #60a5fa;
}
.ai-sub-stat-label {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Technical Details */
.ai-sub-details-grid {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.ai-sub-details-grid .info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}
.ai-sub-details-grid .info-row .label {
    color: #94a3b8;
    font-size: 0.85rem;
}
.ai-sub-details-grid .info-row .value {
    color: #e2e8f0;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .ai-sub-actions-grid {
        grid-template-columns: 1fr;
    }
    .ai-sub-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .ai-sub-plan-info {
        flex-wrap: wrap;
    }
}
