/* Admin Panel - Clean & Modern */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #1a202c;
    line-height: 1.6;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Navigation */
.nav-buttons {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
    z-index: 1000;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #4a5568;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-btn:hover {
    background: white;
    color: #2d3748;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Main Container */
.container {
    max-width: 1400px;
    margin: 60px auto 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header */
.container h1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 50px 40px;
    margin: 0;
    font-size: 2.8rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: -0.02em;
}

.subtitle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    padding: 0 40px 40px;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 400;
}

/* Alert */
#alert {
    margin: 30px 40px 0;
    padding: 16px 20px;
    border-radius: 10px;
    font-weight: 500;
    display: none;
    border-left: 4px solid;
}

.alert-success {
    background: #f0fff4;
    color: #2f855a;
    border-color: #38a169;
}

.alert-error {
    background: #fed7d7;
    color: #c53030;
    border-color: #e53e3e;
}

/* Stats Section */
.stats-section {
    padding: 40px;
    border-bottom: 1px solid #e2e8f0;
}

.stats-section h2 {
    color: #2d3748;
    margin-bottom: 25px;
    font-size: 1.8rem;
    font-weight: 700;
}

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

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 35px 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card h3 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-card p {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Table Section */
.table-section {
    padding: 0;
}

.table-section h2 {
    background: #f7fafc;
    color: #2d3748;
    padding: 30px 40px;
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    border-bottom: 1px solid #e2e8f0;
}

.table-container {
    overflow-x: auto;
    background: white;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.admin-table th {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: white;
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 2px solid #2d3748;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

.admin-table td {
    padding: 16px 15px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    font-size: 13px;
    color: #4a5568;
}

.admin-table tr:nth-child(even) {
    background: #f8fafc;
}

.admin-table tr:hover {
    background: #edf2f7;
    transform: scale(1.001);
    transition: all 0.2s ease;
}

/* Copy Button */
.copy-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.2s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copy-btn:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

.copy-btn.copied {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    animation: pulse 0.6s ease-in-out;
}

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

/* Delete Button */
.delete-btn {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 101, 101, 0.4);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 40px;
    color: #718096;
}

.empty-state h3 {
    color: #4a5568;
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.empty-state p {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .nav-buttons {
        position: static;
        justify-content: center;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }
    
    .nav-btn {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .container {
        margin-top: 0;
        border-radius: 12px;
    }
    
    .container h1 {
        font-size: 2.2rem;
        padding: 35px 25px;
    }
    
    .subtitle {
        font-size: 1rem;
        padding: 0 25px 30px;
    }
    
    .stats-section, #alert {
        padding: 25px;
        margin: 20px 25px 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stat-card {
        padding: 25px 20px;
    }
    
    .stat-card h3 {
        font-size: 2.5rem;
    }
    
    .table-section h2 {
        padding: 25px;
        font-size: 1.5rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 12px 8px;
        font-size: 12px;
    }
    
    .admin-table th {
        font-size: 10px;
    }
    
    .copy-btn {
        font-size: 10px;
        padding: 4px 8px;
        margin-left: 4px;
    }
    
    .delete-btn {
        font-size: 11px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .container h1 {
        font-size: 1.8rem;
    }
    
    .stats-section h2,
    .table-section h2 {
        font-size: 1.3rem;
    }
    
    .stat-card h3 {
        font-size: 2rem;
    }
    
    .admin-table {
        font-size: 11px;
    }
}

/* Announcements Section */
.announcements-section {
    margin: 30px 0;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.announcements-section h2 {
    color: #2d3748;
    margin-bottom: 25px;
    font-size: 1.8rem;
    font-weight: 700;
    background: none;
    padding: 0;
    border: none;
}

.announcement-form-container {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

.announcement-form-container h3 {
    margin-bottom: 20px;
    color: #2d3748;
    font-size: 1.2rem;
    font-weight: 600;
}

.form-row {
    display: flex;
    gap: 20px;
    align-items: end;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

/* Announcement Items */
.announcements-list {
    margin-top: 30px;
}

.announcements-list h3 {
    margin-bottom: 20px;
    color: #2d3748;
    font-size: 1.2rem;
    font-weight: 600;
}

.announcement-item {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.announcement-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.announcement-item.info {
    border-left: 4px solid #3b82f6;
}

.announcement-item.success {
    border-left: 4px solid #10b981;
}

.announcement-item.warning {
    border-left: 4px solid #f59e0b;
}

.announcement-item.error {
    border-left: 4px solid #ef4444;
}

.announcement-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.announcement-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 50%;
}

.announcement-title {
    flex: 1;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.announcement-actions {
    display: flex;
    gap: 8px;
}

.announcement-content {
    margin-left: 52px;
}

.announcement-message {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 15px;
}

.announcement-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #6b7280;
}

.meta-item {
    display: flex;
    align-items: center;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

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

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

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

.no-data {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 40px;
    background: #f9fafb;
    border-radius: 8px;
    border: 2px dashed #d1d5db;
}