/* Admin Panel Styles */
:root {
    /* Admin specific colors */
    --admin-primary: #6366f1;
    --admin-primary-dark: #4f46e5;
    --admin-secondary: #f59e0b;
    --admin-success: #10b981;
    --admin-danger: #ef4444;
    --admin-warning: #f59e0b;
    --admin-info: #06b6d4;
    
    /* Admin layout */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --header-height: 70px;
    
    /* Admin shadows */
    --admin-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --admin-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --admin-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-content {
    text-align: center;
    color: var(--text-primary);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Login Container */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 2rem;
}

.login-card {
    background: var(--bg-primary);
    border-radius: var(--radius-2xl);
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.login-header {
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.login-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 50%;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(123, 97, 255, 0.3),
                0 0 30px rgba(123, 97, 255, 0.2),
                0 0 40px rgba(123, 97, 255, 0.1);
    filter: drop-shadow(0 0 8px rgba(123, 97, 255, 0.4));
    transition: all 0.3s ease;
}

.login-logo:hover {
    box-shadow: 0 6px 25px rgba(123, 97, 255, 0.4),
                0 0 35px rgba(123, 97, 255, 0.3),
                0 0 50px rgba(123, 97, 255, 0.2);
    filter: drop-shadow(0 0 12px rgba(123, 97, 255, 0.6));
    transform: scale(1.02);
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.login-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-left: 3rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: var(--transition-fast);
    background: var(--bg-secondary);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 2.25rem;
    color: var(--text-muted);
    font-size: 1rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 2.25rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
}

.login-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-home {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    transition: var(--transition-fast);
}

.back-home:hover {
    color: var(--primary-color);
}

/* Admin Dashboard */
.admin-dashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    box-shadow: var(--admin-shadow-md);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
}

.brand i {
    font-size: 1.5rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.sidebar-toggle:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-left-color: var(--primary-color);
}

.nav-link.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.user-email {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.logout-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
}

.logout-btn:hover {
    background: #dc2626;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 0;
    min-height: 100vh;
    background: var(--bg-secondary);
    width: 100%;
}

/* Admin Header */
.admin-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--admin-shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(123, 97, 255, 0.3),
                0 0 20px rgba(123, 97, 255, 0.2),
                0 0 30px rgba(123, 97, 255, 0.1);
    filter: drop-shadow(0 0 6px rgba(123, 97, 255, 0.4));
    transition: all 0.3s ease;
}

.admin-brand:hover .admin-logo {
    box-shadow: 0 4px 15px rgba(123, 97, 255, 0.4),
                0 0 25px rgba(123, 97, 255, 0.3),
                0 0 40px rgba(123, 97, 255, 0.2);
    filter: drop-shadow(0 0 8px rgba(123, 97, 255, 0.6));
    transform: scale(1.05);
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.admin-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.view-site-btn {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-site-btn:hover {
    background: var(--primary-dark);
}

/* Content Sections */
.content-section {
    display: none;
    padding: 2rem;
}

.content-section.active {
    display: block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--admin-shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    font-size: 1.5rem;
}

.stat-icon.trending {
    background: var(--danger-color);
}

.stat-icon.freefire {
    background: var(--danger-color);
}

.stat-icon.categories {
    background: var(--success-color);
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Recent Activity */
.recent-activity {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--admin-shadow-sm);
    border: 1px solid var(--border-color);
}

.recent-activity h2 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Analytics Dashboard */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.analytics-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--admin-shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.analytics-card:hover {
    box-shadow: var(--admin-shadow-md);
    transform: translateY(-2px);
}

.analytics-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.analytics-card h3 i {
    color: var(--admin-primary);
}

/* Overview Card */
.overview-card {
    grid-column: 1 / -1;
}

.overview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.overview-stat {
    text-align: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--admin-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Top Lists */
.top-list {
    max-height: 300px;
    overflow-y: auto;
}

.top-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.top-item:last-child {
    margin-bottom: 0;
}

.top-item-content {
    flex: 1;
}

.top-item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.top-item-category {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.top-item-count {
    background: var(--admin-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Category Stats */
.category-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.category-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.category-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1),
                0 0 20px rgba(123, 97, 255, 0.1);
    transition: all 0.3s ease;
}

.category-icon:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15),
                0 0 25px rgba(123, 97, 255, 0.2);
    transform: translateY(-1px);
}

.category-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(1.2) contrast(1.1) drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
    border-radius: 50%;
}

.category-icon.freefire { background: #ff6b35; }
.category-icon.couple { background: #e91e63; }
.category-icon.men { background: #2196f3; }
.category-icon.women { background: #9c27b0; }
.category-icon.all { background: var(--admin-primary); }

.category-details h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.category-details p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.category-count {
    background: var(--admin-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 600;
}

/* Trending Analysis */
.trending-analysis {
    grid-column: 1 / -1;
}

.trending-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.trending-metric {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    text-align: center;
}

.trending-metric h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.trending-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--admin-primary);
}

/* Activity Card */
.activity-card {
    grid-column: 1 / -1;
}

.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.activity-icon {
    width: 35px;
    height: 35px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: white;
}

.activity-icon.copy { background: var(--admin-success); }
.activity-icon.share { background: var(--admin-info); }
.activity-icon.favorite { background: var(--admin-danger); }

.activity-content {
    flex: 1;
}

.activity-text {
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.activity-time {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.loading-analytics {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    font-style: italic;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-box {
    position: relative;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    font-size: 0.9rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
}

/* Table Styles */
.prompts-table-container {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--admin-shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.prompts-table {
    width: 100%;
    border-collapse: collapse;
}

.prompts-table th {
    background: var(--bg-secondary);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.prompts-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.prompts-table tbody tr:hover {
    background: var(--bg-secondary);
}

.table-image {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.table-category {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-xl);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Category Badge Colors */
.category-badge.freefire {
    background: var(--freefire-color);
    color: white;
}

.category-badge.couple {
    background: var(--couple-color);
    color: white;
}

.category-badge.men {
    background: var(--men-color);
    color: white;
}

.category-badge.women {
    background: var(--women-color);
    color: white;
}

.category-badge.all {
    background: var(--all-color);
    color: white;
}

.table-trending {
    color: var(--success-color);
    font-weight: 600;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn-sm {
    padding: 0.5rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
}

.edit-btn {
    background: var(--admin-info);
    color: white;
}

.delete-btn {
    background: var(--danger-color);
    color: white;
}

.action-btn-sm:hover {
    transform: translateY(-1px);
}

/* Form Styles */
.form-container {
    background: var(--bg-primary);
    border-radius: var(--radius-2xl);
    padding: 2.5rem;
    box-shadow: var(--admin-shadow-lg);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--bg-secondary);
}

.form-header h2 {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-header h2::before {
    content: '✨';
    font-size: 1.5rem;
}

.cancel-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: var(--transition-normal);
}

.cancel-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    position: relative;
}

.form-group label::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: var(--bg-primary);
}

.character-count {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    font-weight: 500;
}

/* Category Buttons */
.category-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.category-buttons input[type="radio"] {
    display: none;
}

.category-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: var(--transition-normal);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.category-btn:hover::before {
    left: 100%;
}

.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.category-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.category-text {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.category-buttons input[type="radio"]:checked + .category-btn {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.category-buttons input[type="radio"]:checked + .category-btn .category-text {
    color: white;
}

.category-buttons input[type="radio"]:checked + .category-btn .category-icon {
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    80% {
        transform: translateY(-5px);
    }
}

/* Subcategory Styles */
.subcategory-group {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    animation: slideDown 0.3s ease-out;
}

.subcategory-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.subcategory-buttons input[type="radio"] {
    display: none;
}

.subcategory-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: center;
    position: relative;
    overflow: hidden;
    min-width: 100px;
}

.subcategory-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), transparent);
    transition: left 0.4s;
}

.subcategory-btn:hover::before {
    left: 100%;
}

.subcategory-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.subcategory-icon {
    font-size: 1.2rem;
}

.subcategory-text {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.subcategory-buttons input[type="radio"]:checked + .subcategory-btn {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.subcategory-buttons input[type="radio"]:checked + .subcategory-btn .subcategory-text {
    color: white;
}

.subcategory-buttons input[type="radio"]:checked + .subcategory-btn .subcategory-icon {
    animation: pulse 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Enhanced Textarea */
.textarea-container {
    position: relative;
}

.textarea-container textarea {
    width: 100%;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1.05rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
    resize: vertical;
    min-height: 300px;
    line-height: 1.7;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0.01em;
}

.textarea-container textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), var(--shadow-md);
    background: var(--bg-primary);
    transform: translateY(-1px);
}

.textarea-container textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.character-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.textarea-tips {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.textarea-tips i {
    color: var(--warning-color);
    font-size: 1rem;
}

/* Image Upload */
.image-upload-area {
    border: 3px dashed var(--border-color);
    border-radius: var(--radius-xl);
    padding: 3rem;
    text-align: center;
    transition: var(--transition-normal);
    cursor: pointer;
    position: relative;
    background: var(--bg-secondary);
    background-image: linear-gradient(45deg, transparent 25%, rgba(99, 102, 241, 0.02) 25%, rgba(99, 102, 241, 0.02) 75%, transparent 75%);
    background-size: 20px 20px;
}

.image-upload-area:hover {
    border-color: var(--primary-color);
    background: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.image-upload-area.dragover {
    border-color: var(--accent-color);
    background: rgba(16, 185, 129, 0.05);
    transform: scale(1.02);
}

.upload-placeholder {
    color: var(--text-secondary);
}

.upload-placeholder i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.upload-placeholder p {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.upload-placeholder small {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.image-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.upload-placeholder i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.upload-placeholder p {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-placeholder small {
    color: var(--text-muted);
}

.image-preview {
    position: relative;
    display: inline-block;
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: var(--radius-lg);
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--danger-color);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-progress {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    position: relative;
    transition: var(--transition-fast);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--bg-secondary);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-xl);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    pointer-events: auto !important;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    padding: 1rem 2rem;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-secondary:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Checkbox Styles */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

/* Progress Styles */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-sm);
    transition: width 0.3s ease;
}

.progress-text {
    display: block;
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-secondary:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.setting-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--admin-shadow-sm);
    border: 1px solid var(--border-color);
    text-align: center;
}

.setting-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.setting-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Modal Base Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px) saturate(150%);
    -webkit-backdrop-filter: blur(8px) saturate(150%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: var(--bg-primary);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Modal Styles */
.edit-modal-content {
    min-width: 600px;
    max-width: 800px;
    padding: 0;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-body {
    padding: 1.5rem;
}

.delete-modal-content {
    min-width: 400px;
    padding: 0;
}

.delete-warning {
    text-align: center;
    padding: 1rem;
}

.delete-warning i {
    font-size: 3rem;
    color: var(--danger-color);
    margin-bottom: 1rem;
}

.delete-warning p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Toast for Admin */
#adminToast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10001;
}

#adminToast .toast-icon.success {
    color: var(--success-color);
}

#adminToast .toast-icon.error {
    color: var(--danger-color);
}

#adminToast .toast-icon.warning {
    color: var(--warning-color);
}

#adminToast .toast-icon.info {
    color: var(--admin-info);
}

@media (max-width: 768px) {
    /* Single column layout for all grids */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    /* Category buttons - single column */
    .category-buttons {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-btn {
        padding: 1.5rem;
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }
    
    .category-icon {
        font-size: 1.8rem;
        margin-bottom: 0;
        margin-right: 1rem;
    }
    
    .category-text {
        font-size: 1rem;
    }
    
    /* Form and layout adjustments */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-actions {
        width: 100%;
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-box {
        min-width: auto;
        width: 100%;
    }
    
    .prompts-table-container {
        overflow-x: auto;
    }
    
    .edit-modal-content {
        min-width: auto;
        width: 95vw;
        max-width: none;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-container {
        padding: 1.5rem;
        margin: 0.5rem;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .image-upload-area {
        padding: 2rem 1rem;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 1.25rem;
    }
    
    .textarea-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .login-card {
        padding: 2rem;
    }
    
    /* Mobile-specific table styling */
    .table-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .action-btn-sm {
        width: 100%;
        height: auto;
        padding: 0.5rem 1rem;
        border-radius: var(--radius-md);
    }
    
    /* Admin header mobile */
    .admin-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-left,
    .header-right {
        width: 100%;
        justify-content: center;
    }
    
    .page-title {
        font-size: 1.25rem;
        text-align: center;
    }
    
    /* Subcategory responsive styles */
    .subcategory-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .subcategory-btn {
        justify-content: center;
        padding: 1rem;
    }
}

/* Extra small mobile adjustments */
@media (max-width: 480px) {
    .fab-container {
        bottom: 1rem;
        right: 1rem;
    }
    
    .fab-main {
        width: 60px;
        height: 60px;
        font-size: 1.25rem;
    }
    
    .fab-item {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .form-container {
        margin: 0.25rem;
        padding: 1rem;
    }
    
    .category-btn {
        padding: 1.25rem;
    }
    
    .category-icon {
        font-size: 1.5rem;
    }
    
    .category-text {
        font-size: 0.9rem;
    }
}

/* Floating Action Wheel - Gen Z Design */
.fab-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
}

.fab-main {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.fab-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.fab-main:hover::before {
    opacity: 1;
}

.fab-main i {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.fab-close {
    position: absolute;
    opacity: 0;
    transform: rotate(180deg);
}

.fab-main.active .fas.fa-magic {
    opacity: 0;
    transform: rotate(-180deg);
}

.fab-main.active .fab-close {
    opacity: 1;
    transform: rotate(0deg);
}

.fab-main:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.6);
}

.fab-main:active {
    transform: scale(0.95) rotate(-5deg);
}

.fab-menu {
    position: absolute;
    bottom: 85px;
    right: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.fab-menu.active {
    opacity: 1;
    visibility: visible;
}

.fab-item {
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: white;
    position: relative;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: scale(0) rotate(180deg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Individual FAB item colors - Gen Z palette */
.fab-item:nth-child(1) {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    transition-delay: 0.1s;
}

.fab-item:nth-child(2) {
    background: linear-gradient(135deg, #4ecdc4, #00d2d3);
    transition-delay: 0.15s;
}

.fab-item:nth-child(3) {
    background: linear-gradient(135deg, #45b7d1, #3742fa);
    transition-delay: 0.2s;
}

.fab-item:nth-child(4) {
    background: linear-gradient(135deg, #96ceb4, #1dd1a1);
    transition-delay: 0.25s;
}

.fab-item:nth-child(5) {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    transition-delay: 0.3s;
}

.fab-menu.active .fab-item {
    transform: scale(1) rotate(0deg);
}

.fab-item:hover {
    transform: scale(1.2) rotate(-10deg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.fab-item:active {
    transform: scale(0.9) rotate(5deg);
}

/* Tooltip styling */
.fab-item::after {
    content: attr(title);
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--border-color);
}

.fab-item:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-10px);
}

/* Categories Management Styles */
.categories-container {
    margin-top: 2rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.category-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.category-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.category-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
}

.category-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.category-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-color);
}

.status-indicator.hidden {
    background: var(--text-secondary);
}

.category-subcategories {
    margin-bottom: 1.5rem;
}

.subcategories-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.subcategories-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.subcategory-tag {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-xl);
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
}

.category-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.category-btn {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-btn:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.category-btn.edit:hover {
    background: var(--primary-color);
    color: white;
}

.category-btn.delete:hover {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

/* Loading skeleton for categories */
.loading-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.skeleton-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.skeleton-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Category Modal Styles */
.category-modal-content {
    max-width: 600px;
    width: 90vw;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

/* Fixed header */
.category-modal-content .modal-header {
    flex-shrink: 0;
    background: white;
    border-radius: 12px 12px 0 0;
}

/* Scrollable body */
.category-modal-content .modal-body {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f9fafb;
}

.category-modal-content .modal-body::-webkit-scrollbar {
    width: 6px;
}

.category-modal-content .modal-body::-webkit-scrollbar-track {
    background: #f9fafb;
    border-radius: 3px;
}

.category-modal-content .modal-body::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.category-modal-content .modal-body::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Fixed footer */
.category-modal-content .modal-footer {
    flex-shrink: 0;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: white;
    border-radius: 0 0 12px 12px;
}

.category-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.icon-input-container {
    position: relative;
}

.icon-input-container input {
    padding-right: 3rem;
    text-align: center;
    font-size: 1.5rem;
}

.icon-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 1rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
}

.icon-btn {
    background: none;
    border: 2px solid var(--border-color);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover, .icon-btn.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.subcategories-container {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: var(--bg-primary);
}

.subcategories-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.subcategory-input {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
}

.subcategory-input input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.subcategory-input input:focus {
    outline: none;
}

.remove-subcategory {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.remove-subcategory:hover {
    background: var(--danger-color);
    color: white;
}

.add-subcategory {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 2px dashed var(--border-color);
    background: none;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-subcategory:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(74, 144, 226, 0.05);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-card {
        padding: 1rem;
    }
    
    .category-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .category-actions {
        justify-content: stretch;
    }
    
    .category-btn {
        flex: 1;
        justify-content: center;
    }
    
    .category-modal-content {
        width: 95vw;
        margin: 1rem;
        max-height: 95vh;
    }
    
    /* Ensure scrollable content on mobile */
    .category-modal-content .modal-body {
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        overflow-y: auto;
    }
    
    /* Adjust modal header padding on mobile */
    .category-modal-content .modal-header {
        padding: 1rem;
    }
    
    /* Adjust modal footer padding on mobile */
    .category-modal-content .modal-footer {
        padding: 1rem;
    }
    
    .icon-suggestions {
        justify-content: center;
    }
}

/* Dynamic Subcategory Dropdown */
.form-select {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition-normal);
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-select option {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0.5rem;
}

/* Subcategory Buttons */
.subcategory-group {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.subcategory-group.show {
    opacity: 1;
    transform: translateY(0);
    max-height: 200px;
}

.subcategory-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.subcategory-btn {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.subcategory-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.subcategory-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.subcategory-btn.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Mobile responsive subcategory buttons */
@media (max-width: 768px) {
    .subcategory-buttons {
        flex-direction: column;
    }
    
    .subcategory-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Field Hint */
.field-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-style: italic;
}

/* NEW Badge Styles */
.new-badge {
    background: linear-gradient(135deg, #ff4081, #e91e63);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-xl);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 64, 129, 0.3);
    animation: pulse-new 2s infinite;
    margin-left: 0.5rem;
}

@keyframes pulse-new {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Enhanced Analytics Styles */
.top-rank {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--admin-primary), var(--admin-primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
    margin-right: 0.75rem;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.top-item {
    transition: all 0.3s ease;
}

.top-item:hover {
    transform: translateX(5px);
    background: var(--bg-tertiary);
}

.top-item-count i {
    margin-right: 0.25rem;
    font-size: 0.75rem;
}

.category-metrics {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.category-metrics span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
}

.category-metrics i {
    font-size: 0.75rem;
    color: var(--admin-primary);
}

.category-engagement {
    margin-top: 0.5rem;
}

.engagement-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.trending-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.trending-stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.trending-stat-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--admin-shadow-lg);
    border-color: var(--admin-primary);
}

.trending-stat-icon {
    font-size: 2rem;
    line-height: 1;
}

.trending-stat-content {
    flex: 1;
}

.trending-stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
    line-height: 1.2;
}

.trending-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .trending-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trending-stat-item {
        flex-direction: column;
        text-align: center;
    }
    
    .trending-stat-icon {
        font-size: 1.5rem;
    }
    
    .trending-stat-value {
        font-size: 1.25rem;
    }
}

/* Messages Section Styles */
.messages-container {
    margin-top: 2rem;
}

.messages-table-container {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--admin-shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.messages-table {
    width: 100%;
    border-collapse: collapse;
}

.messages-table th {
    background: var(--bg-secondary);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.messages-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.messages-table tbody tr {
    transition: background 0.2s ease;
}

.messages-table tbody tr:hover {
    background: var(--bg-secondary);
}

.message-name {
    font-weight: 600;
    color: var(--text-primary);
}

.message-email {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.message-text {
    color: var(--text-secondary);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s ease;
}

.message-text:hover {
    color: var(--primary-color);
}

.message-text.expanded {
    white-space: normal;
    word-wrap: break-word;
}

.message-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

.message-actions {
    display: flex;
    gap: 0.5rem;
}

.view-message-btn,
.delete-message-btn {
    padding: 0.5rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
}

.view-message-btn {
    background: var(--admin-info);
    color: white;
}

.view-message-btn:hover {
    background: #0891b2;
    transform: translateY(-1px);
}

.delete-message-btn {
    background: var(--danger-color);
    color: white;
}

.delete-message-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Message Detail Modal */
.message-modal-content {
    max-width: 700px;
    width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.message-modal-content .modal-body {
    overflow-y: auto;
    max-height: calc(85vh - 120px);
}

.message-detail {
    padding: 1.5rem;
}

.message-detail-row {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.message-detail-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.message-detail-label {
    display: block;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.message-detail-value {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.6;
}

.message-detail-value.message-content {
    font-size: 1.05rem;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message-detail-email {
    color: var(--primary-color);
    text-decoration: none;
}

.message-detail-email:hover {
    text-decoration: underline;
}

/* Read/Unread Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.unread {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.status-badge.read {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.status-badge i {
    font-size: 0.65rem;
}

/* Empty State for Messages */
.messages-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.messages-empty i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.messages-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.messages-empty p {
    color: var(--text-muted);
}

/* Mobile Responsive for Messages */
@media (max-width: 768px) {
    .messages-table {
        font-size: 0.85rem;
    }
    
    .messages-table th,
    .messages-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .message-text {
        max-width: 150px;
    }
    
    .message-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .view-message-btn,
    .delete-message-btn {
        width: 100%;
        height: auto;
        padding: 0.5rem 1rem;
        border-radius: var(--radius-md);
    }
    
    .message-modal-content {
        width: 95vw;
        margin: 1rem;
    }
    
    .message-detail {
        padding: 1rem;
    }
    
    .message-detail-row {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }
}

/* Reply to Message Modal Styles */
.reply-modal-content {
    max-width: 700px;
    width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(123, 97, 255, 0.15),
                0 4px 16px rgba(0, 0, 0, 0.1);
}

.reply-modal-content .modal-body {
    overflow-y: auto;
    max-height: calc(85vh - 120px);
}

.dark-mode .reply-modal-content {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.reply-modal-content .modal-header {
    background: linear-gradient(135deg, 
        rgba(123, 97, 255, 0.1) 0%, 
        rgba(168, 85, 247, 0.05) 100%);
    border-bottom: 1px solid rgba(123, 97, 255, 0.2);
}

.reply-modal-content .modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-color);
    font-weight: 700;
}

.reply-modal-content .modal-header h3 i {
    font-size: 1.2rem;
}

.reply-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
}

.reply-field {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.reply-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.reply-label i {
    color: var(--primary-color);
    font-size: 0.85rem;
}

.reply-input,
.reply-textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.dark-mode .reply-input,
.dark-mode .reply-textarea {
    background: rgba(51, 65, 85, 0.4);
    border-color: rgba(148, 163, 184, 0.3);
}

.reply-input:focus,
.reply-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.dark-mode .reply-input:focus,
.dark-mode .reply-textarea:focus {
    background: rgba(51, 65, 85, 0.6);
}

.reply-input[readonly] {
    opacity: 0.7;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.05);
}

.dark-mode .reply-input[readonly] {
    background: rgba(0, 0, 0, 0.2);
}

.reply-textarea {
    resize: vertical;
    min-height: 150px;
    line-height: 1.6;
}

.original-message {
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 150px;
    overflow-y: auto;
}

.dark-mode .original-message {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(148, 163, 184, 0.2);
}

.reply-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 0.25rem;
}

.reply-hint i {
    color: var(--warning-color);
}

.reply-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.reply-actions .btn-primary {
    background: linear-gradient(135deg, #7B61FF 0%, #A855F7 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 4px 15px rgba(123, 97, 255, 0.3);
}

.reply-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(123, 97, 255, 0.4);
}

.reply-actions .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.reply-actions .btn-secondary {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
}

/* Reply Button in Table */
.reply-message-btn {
    padding: 0.5rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #7B61FF, #A855F7);
    color: white;
}

.reply-message-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(123, 97, 255, 0.4);
}

.reply-message-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Status Column Styles */
.message-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.message-status.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.message-status.replied {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.message-status i {
    font-size: 0.7rem;
}

/* View Reply Button */
.view-reply-btn {
    padding: 0.5rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: var(--success-color);
    color: white;
}

.view-reply-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* Quick Reply Templates */
.quick-reply-templates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.template-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    background: linear-gradient(135deg, rgba(123, 97, 255, 0.1) 0%, rgba(168, 85, 247, 0.05) 100%);
    border: 2px solid rgba(123, 97, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.template-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(123, 97, 255, 0.2), transparent);
    transition: left 0.5s;
}

.template-btn:hover::before {
    left: 100%;
}

.template-btn:hover {
    background: linear-gradient(135deg, rgba(123, 97, 255, 0.2) 0%, rgba(168, 85, 247, 0.1) 100%);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(123, 97, 255, 0.3);
}

.template-btn.active {
    background: linear-gradient(135deg, #7B61FF, #A855F7);
    border-color: #A855F7;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(123, 97, 255, 0.4);
}

.template-btn i {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.template-btn.active i {
    color: white;
    transform: scale(1.1);
}

.template-btn span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.template-btn.active span {
    color: white;
}

/* Reply Stats */
.reply-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.char-counter,
.word-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.char-counter i,
.word-counter i {
    color: var(--primary-color);
}

.char-counter span,
.word-counter span {
    font-weight: 700;
    color: var(--primary-color);
}

/* Conversation Thread */
.thread-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: linear-gradient(135deg, #7B61FF, #A855F7);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.5rem;
}

.conversation-thread {
    max-height: 400px;
    overflow-y: auto;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(123, 97, 255, 0.03) 0%, rgba(168, 85, 247, 0.03) 100%);
    border-radius: 16px;
    border: 2px solid rgba(123, 97, 255, 0.15);
}

.thread-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.thread-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.2;
    color: var(--primary-color);
}

.thread-empty p {
    font-size: 0.95rem;
    opacity: 0.7;
}

.thread-message {
    margin-bottom: 1.5rem;
    animation: slideInUp 0.3s ease-out;
}

.thread-message:last-child {
    margin-bottom: 0;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* User Message */
.thread-message.user {
    display: flex;
    justify-content: flex-start;
}

.thread-message.user .message-bubble {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 18px 18px 18px 4px;
    max-width: 75%;
}

/* Admin Reply */
.thread-message.admin {
    display: flex;
    justify-content: flex-end;
}

.thread-message.admin .message-bubble {
    background: linear-gradient(135deg, #7B61FF 0%, #A855F7 100%);
    color: white;
    border-radius: 18px 18px 4px 18px;
    max-width: 75%;
    box-shadow: 0 4px 15px rgba(123, 97, 255, 0.3);
}

.message-bubble {
    padding: 1rem 1.25rem;
    position: relative;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.1);
}

.thread-message.user .message-avatar {
    background: var(--primary-color);
    color: white;
}

.thread-message.admin .message-avatar {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.message-sender {
    font-weight: 700;
    font-size: 0.85rem;
}

.thread-message.user .message-sender {
    color: var(--primary-color);
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-left: auto;
}

.thread-message.user .message-time {
    color: var(--text-muted);
}

.thread-message.admin .message-time {
    color: rgba(255, 255, 255, 0.9);
}

.message-text {
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.thread-message.user .message-text {
    color: var(--text-primary);
}

.thread-message.admin .message-text {
    color: white;
}

.message-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    margin-top: 0.5rem;
    opacity: 0.8;
}

.thread-message.admin .message-status i {
    color: rgba(255, 255, 255, 0.9);
}

/* Additional Reply Button */
.btn-info {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    border: none;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
}

/* Scrollbar Styling for Thread */
.conversation-thread::-webkit-scrollbar {
    width: 8px;
}

.conversation-thread::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.conversation-thread::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #7B61FF, #A855F7);
    border-radius: 10px;
}

.conversation-thread::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #6952e0, #9747d8);
}

/* Mobile Responsive for Reply Modal */
@media (max-width: 768px) {
    .reply-modal-content {
        width: 95vw;
        margin: 1rem;
    }
    
    .reply-form {
        padding: 1rem;
    }
    
    .quick-reply-templates {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .template-btn {
        padding: 0.75rem 0.5rem;
    }
    
    .template-btn i {
        font-size: 1.25rem;
    }
    
    .template-btn span {
        font-size: 0.75rem;
    }
    
    .reply-stats {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .reply-actions {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }
    
    .reply-actions .btn-primary,
    .reply-actions .btn-secondary,
    .reply-actions .btn-info {
        width: 100%;
    }
    
    .conversation-thread {
        max-height: 300px;
        padding: 1rem;
    }
    
    .thread-message.user .message-bubble,
    .thread-message.admin .message-bubble {
        max-width: 85%;
    }
    
    .message-bubble {
        padding: 0.875rem 1rem;
    }
    
    .message-header {
        flex-wrap: wrap;
    }
    
    .message-text {
        font-size: 0.85rem;
    }
    
    .thread-count {
        font-size: 0.7rem;
        min-width: 20px;
        height: 20px;
        padding: 0 6px;
        justify-content: center;
        padding: 1rem;
    }
    
    .message-status {
        font-size: 0.7rem;
        padding: 0.25rem 0.625rem;
    }
}

/* ================================
   MODERN COMPACT PROMPT FORM STYLES
   ================================ */

/* Form Container */
.prompt-form-container {
    max-width: 960px;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* Form Header */
.prompt-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-bottom: 1px solid var(--border-color);
}

.form-header-left h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-header-left h2 i {
    color: #667eea;
    font-size: 1.1rem;
}

.form-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0 0;
}

.cancel-edit-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.cancel-edit-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Modern Form */
.modern-prompt-form {
    padding: 1.5rem;
}

/* Form Sections */
.form-section {
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.section-number {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-field.full-width {
    grid-column: 1 / -1;
}

.form-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-field label .required {
    color: var(--danger-color);
}

.form-field label .optional {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.75rem;
}

.form-field input[type="text"],
.form-field textarea {
    padding: 0.65rem 0.9rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.2s ease;
    min-height: 42px;
}

.form-field input[type="text"]:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #667eea;
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-field textarea {
    resize: vertical;
    min-height: 80px;
}

/* Category Pills - Compact 2-Column */
.category-pills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.category-pills input[type="radio"] {
    display: none;
}

.category-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.category-pill:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.pill-icon {
    font-size: 1rem;
}

.pill-text {
    font-weight: 500;
    color: var(--text-primary);
}

.category-pills input[type="radio"]:checked + .category-pill {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.category-pills input[type="radio"]:checked + .category-pill .pill-text {
    color: white;
}

/* Subcategory Field */
.subcategory-field {
    animation: slideDown 0.25s ease-out;
    padding-top: 0.5rem;
}

.subcategory-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.subcategory-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.subcategory-btn:hover {
    border-color: #667eea;
}

.subcategory-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
}

.subcategory-btn.active .subcategory-text {
    color: white;
}

/* Prompt Content Wrapper */
.prompt-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.prompt-content-wrapper textarea {
    border: 2px solid var(--border-color);
    border-radius: 12px 12px 0 0;
    padding: 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
    min-height: 180px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    resize: vertical;
    transition: all 0.2s ease;
}

.prompt-content-wrapper textarea:focus {
    outline: none;
    border-color: #667eea;
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.prompt-content-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 12px 12px;
}

.char-counter {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.char-counter i {
    font-size: 0.75rem;
}

.prompt-tip {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.prompt-tip i {
    color: #f59e0b;
}

/* Media & Flags Grid */
.media-flags-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.upload-wrapper,
.flags-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.upload-wrapper > label,
.flags-wrapper > label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Compact Upload Area */
.compact-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compact-upload-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.03);
}

.compact-upload-area.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.upload-desktop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.upload-desktop i {
    font-size: 2rem;
    color: #667eea;
}

.upload-desktop p {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

.upload-desktop small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.upload-mobile {
    display: none;
}

.mobile-upload-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-upload-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

/* Image Preview */
.compact-upload-area .image-preview {
    position: relative;
}

.compact-upload-area .image-preview img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
    object-fit: cover;
}

.remove-preview {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 26px;
    height: 26px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.remove-preview:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Upload Progress */
.compact-upload-area .upload-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.compact-upload-area .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.compact-upload-area .progress-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Admin Flags - Toggle Switches */
.admin-flags {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.toggle-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-color);
    transition: all 0.3s ease;
    border-radius: 50px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.toggle-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.toggle-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.toggle-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Form Actions */
.prompt-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Outline Button */
.btn-outline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    border-color: var(--text-secondary);
    background: var(--bg-secondary);
}

/* Gradient Button */
.btn-gradient {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-gradient:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ================================
   RESPONSIVE STYLES - PROMPT FORM
   ================================ */

/* Tablet - 768px */
@media (max-width: 768px) {
    .prompt-form-container {
        margin: 0.5rem;
        border-radius: 12px;
    }
    
    .prompt-form-header {
        padding: 1rem 1.25rem;
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .cancel-edit-btn {
        width: 100%;
        justify-content: center;
    }
    
    .modern-prompt-form {
        padding: 1.25rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .category-pills {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }
    
    .category-pill {
        padding: 0.45rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .pill-icon {
        font-size: 0.9rem;
    }
    
    .media-flags-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .prompt-form-actions {
        flex-direction: column-reverse;
    }
    
    .btn-outline,
    .btn-gradient {
        width: 100%;
        justify-content: center;
        padding: 0.85rem 1.5rem;
    }
    
    .prompt-content-footer {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

/* Mobile - 480px */
@media (max-width: 480px) {
    .prompt-form-container {
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .prompt-form-header {
        padding: 0.85rem 1rem;
    }
    
    .form-header-left h2 {
        font-size: 1.15rem;
    }
    
    .form-subtitle {
        font-size: 0.8rem;
    }
    
    .modern-prompt-form {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 0.9rem;
    }
    
    .section-number {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }
    
    /* Category pills - Horizontal scroll on mobile */
    .category-pills {
        grid-template-columns: 1fr;
        display: flex;
        overflow-x: auto;
        gap: 0.4rem;
        padding-bottom: 0.5rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    .category-pill {
        flex-shrink: 0;
        scroll-snap-align: start;
        padding: 0.4rem 0.65rem;
    }
    
    /* Mobile Upload - Hide drag/drop, show button only */
    .upload-desktop {
        display: none;
    }
    
    .upload-mobile {
        display: block;
    }
    
    .compact-upload-area {
        padding: 1rem;
        min-height: 100px;
    }
    
    /* Toggle switches - More compact */
    .admin-flags {
        padding: 0.85rem;
        gap: 0.85rem;
    }
    
    .toggle-switch {
        width: 42px;
        height: 24px;
    }
    
    .toggle-slider:before {
        height: 18px;
        width: 18px;
    }
    
    .toggle-switch input:checked + .toggle-slider:before {
        transform: translateX(18px);
    }
    
    .toggle-label {
        font-size: 0.8rem;
    }
    
    .toggle-hint {
        font-size: 0.7rem;
    }
    
    .prompt-content-wrapper textarea {
        min-height: 150px;
        font-size: 0.85rem;
    }
    
    .char-counter,
    .prompt-tip {
        font-size: 0.75rem;
    }
}

/* Small Mobile - 360px */
@media (max-width: 360px) {
    .modern-prompt-form {
        padding: 0.85rem;
    }
    
    .form-section {
        margin-bottom: 1.25rem;
        padding-bottom: 1.25rem;
    }
    
    .category-pill {
        padding: 0.35rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .pill-icon {
        font-size: 0.85rem;
    }
    
    .subcategory-btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .btn-outline,
    .btn-gradient {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
}

/* ================================
   ENHANCED MOBILE RESPONSIVE - PROMPT FORM
   ================================ */

/* Extra mobile optimizations for all small screens */
@media (max-width: 576px) {
    /* Content section padding on mobile */
    #add-prompt-section {
        padding: 0.5rem;
    }
    
    /* Form container - full width, no margins */
    .prompt-form-container {
        margin: 0;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }
    
    /* Header - more compact */
    .prompt-form-header {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }
    
    .form-header-left h2 {
        font-size: 1.1rem;
        gap: 0.4rem;
    }
    
    .form-header-left h2 i {
        font-size: 1rem;
    }
    
    .form-subtitle {
        font-size: 0.75rem;
        margin-top: 0.15rem;
    }
    
    /* Form body - tighter padding */
    .modern-prompt-form {
        padding: 0.85rem;
    }
    
    /* Section styling - more compact */
    .form-section {
        margin-bottom: 1.25rem;
        padding-bottom: 1rem;
    }
    
    .section-title {
        font-size: 0.85rem;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .section-number {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }
    
    /* Form fields - compact inputs */
    .form-field {
        gap: 0.3rem;
    }
    
    .form-field label {
        font-size: 0.8rem;
    }
    
    .form-field input[type="text"],
    .form-field textarea {
        padding: 0.55rem 0.75rem;
        font-size: 0.85rem;
        min-height: 40px;
        border-radius: 8px;
    }
    
    /* Category pills - better mobile layout */
    .category-pills {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.35rem;
        padding: 0.25rem 0 0.5rem 0;
        margin: 0 -0.25rem;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .category-pills::-webkit-scrollbar {
        display: none;
    }
    
    .category-pill {
        flex-shrink: 0;
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
        border-radius: 25px;
        white-space: nowrap;
    }
    
    .pill-icon {
        font-size: 0.85rem;
    }
    
    .pill-text {
        font-size: 0.75rem;
    }
    
    /* Subcategory pills - wrap on mobile */
    .subcategory-pills {
        gap: 0.35rem;
    }
    
    .subcategory-btn {
        padding: 0.35rem 0.55rem;
        font-size: 0.7rem;
        border-radius: 20px;
    }
    
    .subcategory-icon {
        font-size: 0.8rem;
    }
    
    /* Prompt textarea - optimized for mobile typing */
    .prompt-content-wrapper textarea {
        min-height: 140px;
        padding: 0.75rem;
        font-size: 0.85rem;
        line-height: 1.5;
        border-radius: 10px 10px 0 0;
    }
    
    .prompt-content-footer {
        padding: 0.5rem 0.75rem;
        border-radius: 0 0 10px 10px;
        gap: 0.4rem;
    }
    
    .char-counter,
    .prompt-tip {
        font-size: 0.7rem;
    }
    
    .char-counter i,
    .prompt-tip i {
        font-size: 0.65rem;
    }
    
    /* Media & Flags section */
    .media-flags-grid {
        gap: 1rem;
    }
    
    .upload-wrapper > label,
    .flags-wrapper > label {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }
    
    /* Upload area - very compact on mobile */
    .compact-upload-area {
        min-height: 90px;
        padding: 0.85rem;
        border-radius: 10px;
    }
    
    .mobile-upload-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        border-radius: 25px;
    }
    
    .mobile-upload-btn i {
        font-size: 0.85rem;
    }
    
    /* Image preview on mobile */
    .compact-upload-area .image-preview img {
        max-height: 120px;
    }
    
    .remove-preview {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
        top: -6px;
        right: -6px;
    }
    
    /* Admin flags - horizontal on very small screens */
    .admin-flags {
        padding: 0.75rem;
        gap: 0.75rem;
        border-radius: 10px;
    }
    
    .toggle-switch-wrapper {
        gap: 0.6rem;
    }
    
    .toggle-switch {
        width: 40px;
        height: 22px;
    }
    
    .toggle-slider:before {
        height: 16px;
        width: 16px;
        left: 3px;
        bottom: 3px;
    }
    
    .toggle-switch input:checked + .toggle-slider:before {
        transform: translateX(18px);
    }
    
    .toggle-label {
        font-size: 0.75rem;
    }
    
    .toggle-hint {
        font-size: 0.65rem;
    }
    
    /* Form actions - full width stacked buttons */
    .prompt-form-actions {
        padding-top: 1rem;
        margin-top: 1rem;
        gap: 0.6rem;
    }
    
    .btn-outline,
    .btn-gradient {
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
        border-radius: 8px;
    }
    
    .btn-outline i,
    .btn-gradient i {
        font-size: 0.85rem;
    }
}

/* Ultra small screens - 320px and below */
@media (max-width: 320px) {
    #add-prompt-section {
        padding: 0.25rem;
    }
    
    .prompt-form-container {
        border-radius: 8px;
    }
    
    .prompt-form-header {
        padding: 0.6rem 0.75rem;
    }
    
    .form-header-left h2 {
        font-size: 1rem;
    }
    
    .modern-prompt-form {
        padding: 0.65rem;
    }
    
    .form-section {
        margin-bottom: 1rem;
        padding-bottom: 0.85rem;
    }
    
    .section-title {
        font-size: 0.8rem;
    }
    
    .section-number {
        width: 20px;
        height: 20px;
        font-size: 0.65rem;
    }
    
    .form-field input[type="text"],
    .form-field textarea {
        padding: 0.5rem 0.65rem;
        font-size: 0.8rem;
    }
    
    .category-pill {
        padding: 0.35rem 0.5rem;
    }
    
    .pill-icon {
        font-size: 0.8rem;
    }
    
    .pill-text {
        font-size: 0.7rem;
    }
    
    .prompt-content-wrapper textarea {
        min-height: 120px;
        font-size: 0.8rem;
    }
    
    .admin-flags {
        padding: 0.6rem;
        gap: 0.6rem;
    }
    
    .toggle-switch {
        width: 36px;
        height: 20px;
    }
    
    .toggle-slider:before {
        height: 14px;
        width: 14px;
    }
    
    .toggle-switch input:checked + .toggle-slider:before {
        transform: translateX(16px);
    }
    
    .btn-outline,
    .btn-gradient {
        padding: 0.65rem 0.85rem;
        font-size: 0.8rem;
    }
}

/* Landscape mobile - optimize for keyboard visible */
@media (max-height: 500px) and (orientation: landscape) {
    .prompt-form-container {
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .form-section {
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    .prompt-content-wrapper textarea {
        min-height: 100px;
    }
    
    .admin-flags {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .toggle-switch-wrapper {
        flex: 1;
        min-width: 140px;
    }
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
    .category-pill,
    .subcategory-btn,
    .mobile-upload-btn,
    .btn-outline,
    .btn-gradient {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .toggle-switch {
        min-width: 44px;
    }
    
    .compact-upload-area {
        min-height: 100px;
    }
}

/* =============================================
   ADMIN DARK MODE THEME
   ============================================= */
body.admin-dark-mode {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --border-color: rgba(255, 255, 255, 0.1);
    --primary-color: #684efb;
    --primary-dark: #5840e0;
    background: #0f0f1a;
    color: #ffffff;
}

body.admin-dark-mode::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(104, 78, 251, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(76, 156, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(138, 88, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

body.admin-dark-mode .admin-dashboard {
    position: relative;
    z-index: 1;
}

body.admin-dark-mode .loading-screen {
    background: #0f0f1a;
}

body.admin-dark-mode .admin-header {
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.admin-dark-mode .stat-card,
body.admin-dark-mode .analytics-card,
body.admin-dark-mode .dashboard-card,
body.admin-dark-mode .setting-card {
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.admin-dark-mode .modal-content {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.admin-dark-mode .prompts-table,
body.admin-dark-mode .messages-table {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.admin-dark-mode .prompts-table thead,
body.admin-dark-mode .messages-table thead {
    background: rgba(104, 78, 251, 0.2);
}

body.admin-dark-mode .prompts-table tbody tr:hover,
body.admin-dark-mode .messages-table tbody tr:hover {
    background: rgba(104, 78, 251, 0.1);
}

body.admin-dark-mode input,
body.admin-dark-mode textarea,
body.admin-dark-mode select {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

body.admin-dark-mode input:focus,
body.admin-dark-mode textarea:focus,
body.admin-dark-mode select:focus {
    border-color: #684efb;
    box-shadow: 0 0 0 3px rgba(104, 78, 251, 0.2);
}

body.admin-dark-mode input::placeholder,
body.admin-dark-mode textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* =============================================
   HEADER NEW BUTTONS
   ============================================= */
.dashboard-link-btn {
    background: linear-gradient(135deg, #684efb 0%, #4c9cff 100%);
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(104, 78, 251, 0.3);
}

.dashboard-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(104, 78, 251, 0.4);
}

.header-logout-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.header-logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

/* Admin dashboard visible by default now */
.admin-dashboard {
    display: block !important;
}

/* Responsive adjustments for header buttons */
@media (max-width: 768px) {
    .dashboard-link-btn span,
    .view-site-btn span {
        display: none;
    }
    
    .dashboard-link-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
    }
    
    .dashboard-link-btn i {
        margin: 0;
    }
    
    .header-right {
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .admin-header {
        padding: 0.75rem 1rem;
    }
    
    .admin-brand img {
        width: 36px;
        height: 36px;
    }
    
    .page-title {
        font-size: 1rem;
    }
    
    .admin-subtitle {
        display: none;
    }
}
/* ============================================
   VIDEO REQUESTS MANAGEMENT STYLES
   ============================================ */

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.filter-tab {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-tab:hover {
    background: rgba(255, 255, 255, 0.1);
}

.filter-tab.active {
    background: var(--admin-primary);
    border-color: var(--admin-primary);
    color: white;
}

.filter-tab .badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.85rem;
}

.badge-warning {
    background: var(--admin-warning) !important;
    color: white;
}

.badge-info {
    background: var(--admin-info) !important;
    color: white;
}

.badge-success {
    background: var(--admin-success) !important;
    color: white;
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-bar i {
    color: var(--text-secondary);
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
}

.search-bar input::placeholder {
    color: var(--text-secondary);
}

/* Table Styles */
.table-container {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.admin-table thead {
    background: rgba(255, 255, 255, 0.05);
}

.admin-table th {
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.admin-table tbody tr {
    transition: background 0.3s ease;
}

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.prompt-cell {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge-processing {
    background: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.status-badge-completed {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

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

.btn-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-upload:hover {
    background: var(--admin-primary);
    border-color: var(--admin-primary);
    color: white;
}

.btn-view:hover {
    background: var(--admin-info);
    border-color: var(--admin-info);
    color: white;
}

.btn-play:hover {
    background: var(--admin-success);
    border-color: var(--admin-success);
    color: white;
}

/* Empty/Loading States */
.table-loading,
.table-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.table-loading i,
.table-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.5;
}

/* Video Upload Modal */
.upload-info {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.upload-info p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.upload-info strong {
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--admin-primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Upload Progress */
.upload-progress {
    margin: 1.5rem 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--admin-primary), var(--admin-info));
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .filter-tabs {
        flex-wrap: wrap;
    }
    
    .filter-tab {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .admin-table {
        font-size: 0.9rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.75rem;
    }
    
    .prompt-cell {
        max-width: 200px;
    }
}
