/* Base Styles */
:root {
    --ic-blue: #1e3a8a;
    --ic-blue-light: #3b82f6;
    --ic-blue-dark: #1e40af;
    --ic-gray: #6b7280;
    --ic-gray-light: #f3f4f6;
    --ic-gray-dark: #374151;
    --ic-white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--ic-gray-light) 0%, #e5e7eb 100%);
    min-height: 100vh;
    color: var(--ic-gray-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    background: var(--ic-white);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--ic-blue);
}

.logo-image {
    height: 50px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--ic-gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--ic-blue);
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.hero h1 {
    font-size: 2.5rem;
    color: var(--ic-blue);
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    color: var(--ic-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.card {
    background: var(--ic-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e5e7eb;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--ic-blue);
    margin-bottom: 1rem;
    text-align: center;
}

.card h2 {
    color: var(--ic-blue);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.card p {
    color: var(--ic-gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.card-features {
    list-style: none;
    margin-bottom: 2rem;
}

.card-features li {
    padding: 0.5rem 0;
    color: var(--ic-gray);
    position: relative;
    padding-left: 1.5rem;
}

.card-features li:before {
    content: "✓";
    color: var(--ic-blue);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--ic-blue);
    color: var(--ic-white);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
}

.btn:hover {
    background: var(--ic-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--ic-blue);
    color: var(--ic-blue);
}

.btn-outline:hover {
    background: var(--ic-blue);
    color: var(--ic-white);
}

.btn-success {
    background: #10b981;
}

.btn-success:hover {
    background: #059669;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--ic-gray-dark);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--ic-blue);
}

/* Footer */
.footer {
    background: var(--ic-gray-dark);
    color: var(--ic-white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 10px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

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

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

.hidden {
    display: none;
}

/* Cloudflare Turnstile Styles */
.cf-turnstile {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
    min-height: 65px;
}

/* Ensure Turnstile widget is properly sized */
.cf-turnstile iframe {
    border-radius: var(--radius);
}

/* Loading state for submit button */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Enhanced Admin Styles */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.admin-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.admin-tab:hover {
    background: var(--ic-gray-light);
}

.admin-tab.active {
    border-bottom-color: var(--ic-blue);
    color: var(--ic-blue);
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

.stat-card {
    background: var(--ic-white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--ic-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--ic-gray);
    font-size: 0.9rem;
}

.log-output {
    background: #1a1a1a;
    color: #00ff00;
    padding: 1.5rem;
    border-radius: var(--radius);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    max-height: 400px;
    overflow-y: auto;
}

.bulk-actions {
    background: var(--ic-gray-light);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

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

.user-table th {
    background: var(--ic-gray-light);
    font-weight: 600;
}

.user-table tr:hover {
    background: var(--ic-gray-light);
}

.checkbox-cell {
    width: 40px;
}

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

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    width: auto;
}

.btn-danger {
    background: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-success {
    background: #10b981;
}

.btn-success:hover {
    background: #059669;
}

.search-box input {
    width: 100%;
    max-width: 300px;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    text-decoration: none;
}

.pagination a:hover {
    background: var(--ic-gray-light);
}

.pagination .active {
    background: var(--ic-blue);
    color: white;
}

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

/* Responsive improvements */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .admin-tabs {
        flex-wrap: wrap;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .user-table {
        font-size: 0.8rem;
    }
}
