/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #1e293b;
    line-height: 1.7;
    font-size: 16px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(248, 250, 252, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

/* Selection */
::selection {
    background: rgba(102, 126, 234, 0.2);
    color: #1e293b;
}

::-moz-selection {
    background: rgba(102, 126, 234, 0.2);
    color: #1e293b;
}

/* Layout */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.sidebar-header {
    padding: 2rem 2rem 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}


.sidebar-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    margin: 0;
}

.nav-menu {
    list-style: none;
    padding: 1.5rem 0;
}

.nav-menu li {
    margin: 0.75rem 0;
}

.nav-menu a {
    display: flex;
    align-items: center;
    padding: 1.25rem 2rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.025em;
    border-radius: 0 25px 25px 0;
    margin-right: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    transition: width 0.3s ease;
    z-index: -1;
}

.nav-menu a:hover::before,
.nav-menu a.active::before {
    width: 100%;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: white;
    transform: translateX(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-menu i {
    margin-right: 1rem;
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.main-content {
    margin-left: 280px;
    min-height: 100vh;
    padding: 0;
    background: transparent;
}

.top-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 2rem 2.5rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Back Button Styles */
.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-btn {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #64748b;
    font-size: 16px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.back-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #f8fafc;
    transform: translateX(-1px);
}

.back-btn:active {
    background: #f1f5f9;
    transform: translateX(0);
    transition: all 0.1s ease;
}

.back-btn i {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.back-btn:hover i {
    transform: translateX(-1px);
}

.back-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 ease;
}

.back-btn:hover::before {
    left: 100%;
}

.user-info {
    display: flex;
    align-items: center;
    background: rgba(248, 250, 252, 0.8);
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    color: #475569;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.user-info i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
    color: #667eea;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2.5rem;
    display: flex;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 2rem;
    position: relative;
    overflow: hidden;
}

.stat-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    filter: blur(20px);
    opacity: 0.3;
    transform: scale(1.2);
}

.stat-icon.campaigns {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.stat-icon.domains {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.4);
}

.stat-icon.approved {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
}

.stat-icon.contacted {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: white;
    box-shadow: 0 8px 25px rgba(67, 233, 123, 0.4);
}

.stat-icon.forwarded {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.4);
}

.stat-icon i {
    font-size: 1.75rem;
    position: relative;
    z-index: 1;
}

.stat-info h3 {
    font-size: 2.75rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    line-height: 1;
}

.stat-info p {
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    padding: 0 2.5rem 2.5rem;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.card-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8), rgba(226, 232, 240, 0.4));
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
}

.card-header h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.025em;
}

.card-header i {
    margin-right: 0.75rem;
    color: #667eea;
    font-size: 1.2rem;
}

.card-body {
    padding: 2rem;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.025em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: white;
    box-shadow: 0 8px 25px rgba(67, 233, 123, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

/* Loading spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(-1px);
}

/* Campaign List */
.campaign-list {
    space-y: 1rem;
}

.campaign-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: border-color 0.2s ease;
}

.campaign-item:hover {
    border-color: #667eea;
}

.campaign-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.campaign-status {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.status-active {
    background-color: #dcf4e5;
    color: #059669;
}

.status-paused {
    background-color: #fef3c7;
    color: #d97706;
}

.status-completed {
    background-color: #dbeafe;
    color: #2563eb;
}

.status-pending {
    background-color: #f1f5f9;
    color: #64748b;
}

.status-approved {
    background-color: #dcf4e5;
    color: #059669;
}

.status-rejected {
    background-color: #fee2e2;
    color: #dc2626;
}

.status-contacted {
    background-color: #e0e7ff;
    color: #4338ca;
}

.campaign-stats {
    display: flex;
    gap: 1rem;
}

.stat {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #64748b;
}

.stat i {
    margin-right: 0.25rem;
    width: 16px;
}

/* Domain List */
.domain-list {
    space-y: 1rem;
}

.domain-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: border-color 0.2s ease;
}

.domain-item:hover {
    border-color: #667eea;
}

.domain-info strong {
    display: block;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.domain-rating {
    font-size: 0.8rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.domain-metrics {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.metric {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #64748b;
}

.metric i {
    margin-right: 0.25rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #64748b;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
    transition: all 0.3s ease;
}

.empty-state:hover {
    border-color: #cbd5e1;
    background: rgba(248, 250, 252, 0.8);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: #cbd5e1;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.empty-state p {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.empty-state a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
    display: inline-block;
}

.empty-state a:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
    text-decoration: none;
}

/* View All Link */
.view-all {
    display: block;
    text-align: center;
    padding: 1.25rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    margin-top: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
    letter-spacing: 0.025em;
}

.view-all::after {
    content: '→';
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.view-all:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    color: #5a67d8;
    text-decoration: none;
}

.view-all:hover::after {
    transform: translateX(4px);
}

/* Pulse Animation for New Items */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
    100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Responsive */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 280px;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        padding: 0 1.5rem 1.5rem;
        gap: 1.5rem;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .top-header {
        padding: 1.5rem;
    }
    
    .top-header h1 {
        font-size: 1.75rem;
    }
    
    .stat-card {
        padding: 2rem;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        margin-right: 1.5rem;
    }
    
    .stat-icon i {
        font-size: 1.5rem;
    }
    
    .stat-info h3 {
        font-size: 2.25rem;
    }
}

@media (max-width: 480px) {
    .dashboard-grid,
    .content-grid {
        padding: 1rem;
    }
    
    .top-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .top-header h1 {
        font-size: 1.5rem;
    }
    
    .stat-card {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

/* Forms */
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e293b;
    letter-spacing: 0.025em;
}

.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: rgba(248, 250, 252, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.form-control.textarea {
    min-height: 120px;
    resize: vertical;
}

/* Campaign Select Dropdown */
.campaign-select {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
    min-width: 200px;
}

.campaign-select:hover {
    border-color: #3b82f6;
    background-color: #f8fafc;
}

.campaign-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: white;
}

.campaign-select option {
    padding: 0.5rem;
    font-weight: 500;
    background: white;
    color: #374151;
}

.campaign-select option:hover {
    background: #f3f4f6;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #374151;
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

/* Clickable Table Rows */
.table tbody tr.clickable-row {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.table tbody tr.clickable-row:hover {
    background-color: #f1f5f9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.table tbody tr.clickable-row:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.alert i {
    margin-right: 0.5rem;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-warning {
    background-color: #fefce8;
    color: #ca8a04;
    border: 1px solid #fef08a;
}

.alert-info {
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.help-text {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* Button Sizes */
.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

/* Card Header Actions */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Detail Items */
.detail-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.detail-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-item strong {
    display: inline-block;
    width: 120px;
    color: #374151;
}

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

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: #64748b;
}

/* Margin Utilities */
.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

/* Quality Score */
.quality-score {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.875rem;
}

.score-high {
    background-color: #dcfce7;
    color: #166534;
}

.score-medium {
    background-color: #fefce8;
    color: #ca8a04;
}

.score-low {
    background-color: #fee2e2;
    color: #dc2626;
}

/* Metric Items */
.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.metric-label {
    font-weight: 500;
    color: #64748b;
}

.metric-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

/* Filter Section */
.filter-section {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-section label {
    margin: 0;
    font-weight: 500;
    color: #374151;
}

/* Text Colors */
.text-success {
    color: #059669;
}

.text-warning {
    color: #d97706;
}

.text-danger {
    color: #dc2626;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.badge-primary {
    background-color: #3b82f6;
    color: white;
}

.badge-success {
    background-color: #10b981;
    color: white;
}

.badge-secondary {
    background-color: #6b7280;
    color: white;
}

/* Template Variables */
.variable-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.variable-item {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.variable-item code {
    background: #1e293b;
    color: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.variable-item span {
    font-size: 0.875rem;
    color: #64748b;
}

/* Info Box */
.info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 1.5rem;
}

.info-box h4 {
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.info-box p {
    color: #1e40af;
    margin-bottom: 1rem;
}

/* Checkbox Wrapper */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.checkbox-wrapper input[type="checkbox"] {
    margin-right: 0.5rem;
    width: auto;
}

.checkbox-wrapper label {
    margin-bottom: 0;
    cursor: pointer;
}

/* Template Source */
.template-source .field-group {
    margin-bottom: 1.5rem;
}

.template-source .field-group:last-child {
    margin-bottom: 0;
}

.code-block {
    background: #1e293b;
    color: #f1f5f9;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Email Preview */
.email-preview {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.email-header {
    background: #f8fafc;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.email-field {
    margin-bottom: 0.5rem;
}

.email-field:last-child {
    margin-bottom: 0;
}

.email-body {
    padding: 1.5rem;
    background: white;
    min-height: 200px;
    line-height: 1.6;
}

/* Template Info Grid */
.template-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-item {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.info-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
}

/* Preview Actions */
.preview-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

/* Header Controls */
.header-controls {
    display: flex;
    align-items: center;
}

.header-controls select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
}

/* Chart Legend */
.chart-legend {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    gap: 1.5rem;
}

.metric-card {
    text-align: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.metric-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* API Usage */
.api-usage-list {
    space-y: 1rem;
}

.api-usage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}

.api-info strong {
    display: block;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.api-calls {
    font-size: 0.875rem;
    color: #64748b;
}

.api-metrics {
    text-align: right;
}

.credits,
.success-rate {
    display: block;
    font-size: 0.875rem;
    color: #64748b;
}

.success-rate {
    margin-top: 0.25rem;
}

/* Performance Rate */
.performance-rate {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.875rem;
}

.rate-high {
    background-color: #dcfce7;
    color: #166534;
}

.rate-medium {
    background-color: #fefce8;
    color: #ca8a04;
}

.rate-low {
    background-color: #fee2e2;
    color: #dc2626;
}

/* Automation Status Panel */
.automation-status {
    margin-bottom: 2rem;
}

.automation-status .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.automation-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.automation-metric {
    text-align: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.automation-metric .metric-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2563eb;
    margin-bottom: 0.25rem;
}

.automation-metric .metric-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.recent-automation h4 {
    margin-bottom: 1rem;
    color: #374151;
    font-size: 1rem;
    font-weight: 600;
}

.automation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    background: white;
}

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

.automation-info strong {
    color: #111827;
    font-size: 0.875rem;
}

.automation-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 100px;
}

.progress-bar.small {
    height: 6px;
    width: 60px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar.small .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.empty-automation {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.empty-automation i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #9ca3af;
}

.empty-automation p {
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* Activity Feed */
.activity-feed {
    space-y: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: border-color 0.2s ease;
}

.activity-item:hover {
    border-color: #667eea;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.activity-subtitle {
    font-size: 0.875rem;
    color: #64748b;
}

.activity-time {
    font-size: 0.875rem;
    color: #64748b;
    white-space: nowrap;
}

/* Settings Page */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.info-item strong {
    color: #374151;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.status-success {
    background-color: #dcfce7;
    color: #166534;
}

.status-error {
    background-color: #fee2e2;
    color: #dc2626;
}

/* Test Grid */
.test-grid {
    display: grid;
    gap: 1rem;
}

.test-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.test-info strong {
    display: block;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.test-info p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: #64748b;
    cursor: pointer;
}

.password-toggle:hover {
    color: #374151;
}

/* Form Group Spacing */
.form-group {
    position: relative;
}

/* Gmail Account Management Styles */
.gmail-accounts-section {
    margin-top: 2rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #64748b;
}

.accounts-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.account-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.account-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.account-info {
    flex: 1;
}

.account-email {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.account-email i {
    color: #6366f1;
}

.account-status {
    margin-bottom: 0.5rem;
}

.account-date {
    font-size: 0.875rem;
    color: #64748b;
}

.account-actions {
    display: flex;
    gap: 0.5rem;
}

.gmail-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-success {
    background: #dcfce7;
    color: #166534;
}

.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-error {
    background: #fee2e2;
    color: #dc2626;
}

/* Button variants for Gmail actions */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .account-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .account-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .gmail-actions {
        flex-direction: column;
        align-items: stretch;
    }
}