/* Admin Panel Styles */

.tab-nav {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--text);
    background: rgba(15, 23, 42, 0.02);
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(15, 23, 42, 0.02);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background: rgba(76, 175, 80, 0.12);
    color: #2e7d32;
}

.status-badge.inactive,
.status-badge.cancelled {
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-secondary);
}

.small-text {
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    border-radius: 4px;
}

.btn-icon:hover {
    background: rgba(15, 23, 42, 0.05);
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    cursor: pointer;
    background: var(--surface);
}

.btn-outline-danger {
    color: #d32f2f;
    border-color: #d32f2f;
}

.btn-outline-danger:hover {
    background: #ffebee;
}

.loading,
.empty,
.error {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
}

.error {
    color: #d32f2f;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--surface);
    width: 600px;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.2s;
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: rgba(15, 23, 42, 0.02);
}

.detail-row {
    display: flex;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 8px;
}

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

.detail-label {
    width: 160px;
    color: var(--text-secondary);
    font-weight: 500;
    flex-shrink: 0;
}

.detail-value {
    flex-grow: 1;
    word-break: break-word;
}

.warning-highlight {
    background-color: #fff3cd;
    color: #856404;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #ffeeba;
}

.section-title {
    font-size: 14px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 20px 0 10px 0;
    letter-spacing: 0.5px;
}

.id-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.id-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.stat-card .stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.stat-card .stat-trend {
    font-size: 13px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-trend.positive {
    color: #2e7d32;
}

.stat-trend.neutral {
    color: var(--text-secondary);
}

/* Improved List Styles */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.chat-item {
    transition: background 0.2s;
    border: 1px solid transparent;
}

.chat-item:hover {
    background: rgba(15, 23, 42, 0.02);
    border-color: var(--border);
}

.user-search-box {
    width: 100%;
    margin-bottom: 16px;
}
/* Users Table */
.table-responsive {
    overflow-x: auto;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    text-align: left;
    padding: 12px;
    background: rgba(15, 23, 42, 0.02);
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    color: var(--text-secondary);
}
.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.data-table tr:hover {
    background: rgba(15, 23, 42, 0.02);
}
.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.user-avatar-sm, .user-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.user-avatar-placeholder {
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}
.user-name {
    font-weight: 500;
    color: var(--text);
}
.user-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Feed Style Posts */
.feed-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}
.feed-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}
.feed-meta {
    font-size: 13px;
    color: var(--text-secondary);
}
.feed-type {
    font-weight: 600;
    color: var(--text);
    margin-right: 8px;
}
.feed-body {
    background: rgba(15, 23, 42, 0.02);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
    margin-bottom: 12px;
}

/* Form Inputs */
.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(47, 125, 246, 0.1);
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Badge Tooltips */
.stats-badges .badge {
    cursor: help;
}

/* User Details Modal */
.user-details-modal .section-title {
    font-size: 15px;
    margin-top: 24px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 4px;
}
