* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 2rem;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    opacity: 0.8;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
}

.tab:hover {
    background: rgba(255, 255, 255, 0.3);
}

.tab.active {
    background: white;
    color: #667eea;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Stats Bar */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stat-card p {
    color: #667eea;
    font-size: 2rem;
    font-weight: bold;
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filters input,
.filters select {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    flex: 1;
    min-width: 200px;
}

/* Sponsors Grid */
.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.sponsor-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.sponsor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

.sponsor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.tier-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    background: #e0e7ff;
    color: #4338ca;
}

.sponsor-actions {
    display: flex;
    gap: 0.5rem;
}

.sponsor-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.sponsor-actions button:hover {
    opacity: 1;
}

.sponsor-logo {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.logo-placeholder {
    color: #999;
    font-size: 0.8rem;
}

.sponsor-card h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.sponsor-card .category {
    color: #667eea;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.sponsor-card .description {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.sponsor-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge.active {
    background: #d1fae5;
    color: #065f46;
}

.badge.inactive {
    background: #fee2e2;
    color: #991b1b;
}

.badge.featured {
    background: #fef3c7;
    color: #92400e;
}

/* Tiers List */
.tiers-list {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tier-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.tier-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.count-badge {
    background: #e0e7ff;
    color: #4338ca;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tier-description {
    color: #666;
    margin-bottom: 1rem;
}

.tier-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: #999;
}

/* Notices List */
.notices-list {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.notice-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-left: 4px solid #667eea;
}

.notice-card.variant-urgent {
    border-left-color: #ef4444;
}

.notice-card.variant-success {
    border-left-color: #10b981;
}

.notice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.variant-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.variant-badge.info {
    background: #e0e7ff;
    color: #4338ca;
}

.variant-badge.urgent {
    background: #fee2e2;
    color: #991b1b;
}

.variant-badge.success {
    background: #d1fae5;
    color: #065f46;
}

.notice-actions {
    display: flex;
    gap: 0.5rem;
}

.notice-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.notice-actions button:hover {
    opacity: 1;
}

.notice-card h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.notice-body {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.notice-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: #999;
}

/* Stats Detail */
.stats-detail {
    display: grid;
    gap: 1.5rem;
}

.stats-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.stats-section h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.stats-section table {
    width: 100%;
    border-collapse: collapse;
}

.stats-section th,
.stats-section td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.stats-section th {
    background: #f8f9fa;
    font-weight: 600;
    color: #666;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.analytics-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.analytics-card h4 {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.analytics-card p {
    color: #667eea;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Add Button */
.add-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #667eea;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 100;
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    max-width: 600px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.auth-content {
    max-width: 400px;
    text-align: center;
}

.auth-content h2 {
    margin-bottom: 1.5rem;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: #333;
    font-weight: 600;
    font-size: 0.85rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group.checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
}

.form-group.checkbox input {
    width: auto;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.submit-btn {
    width: 100%;
    padding: 0.8rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0.5rem;
}

.submit-btn:hover {
    background: #5568d3;
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 1.75rem;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filters input,
    .filters select {
        width: 100%;
    }
    
    .sponsors-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 10% 1rem;
        padding: 1.5rem;
    }
}