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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

/* HEADER */
header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem 0 0 0;
    margin-bottom: 2rem;
    position: relative;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.logo {
    margin-bottom: 1rem;
    display: inline-block;
    width: 100%;
}

.logo h1 {
    color: #667eea;
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
    font-weight: bold;
    text-align: center;
}

.logo-tagline {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0.75rem;
    text-align: center;
}

.logo img {
    max-width: 400px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* HAMBURGER */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: 2px solid #667eea;
    border-radius: 6px;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 100;
    gap: 5px;
    padding: 6px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #667eea;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* NAV */
nav {
    text-align: center;
    border-top: 2px solid #eee;
    padding: 0.75rem 1rem;
    display: block;
    width: 100%;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.4rem 0;
    display: block;
    transition: color 0.3s;
}

nav ul li a:hover { color: #667eea; }

/* CARDS */
.card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.card h2 { color: #667eea; margin-bottom: 1rem; }
.card h3 { color: #764ba2; margin-top: 1.5rem; margin-bottom: 0.75rem; }

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.875rem;
}

textarea {
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
    touch-action: manipulation;
}

.btn:hover { background: #5568d3; transform: translateY(-2px); }
.btn-primary { background: #667eea; }
.btn-primary:hover { background: #5568d3; }
.btn-secondary { background: #6c757d; }
.btn-secondary:hover { background: #5a6268; }
.btn-block { display: block; width: 100%; text-align: center; }
.mb-2 { margin-bottom: 1rem; }

/* ALERTS */
.alert { padding: 1rem; border-radius: 5px; margin-bottom: 1.5rem; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeaa7; }

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

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
}

.stat-number { font-size: 2.5rem; font-weight: bold; margin-bottom: 0.5rem; }
.stat-label  { font-size: 1rem; opacity: 0.9; }

/* TABLES */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }

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

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

table th { background: #f8f9fa; font-weight: 600; color: #667eea; }
table tr:hover { background: #f8f9fa; }

/* UTILITY */
.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; flex-wrap: wrap; gap: 1rem; }
.gap-2 { gap: 1rem; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }

/* FORUM */
.forum-category { border-left: 4px solid #667eea; padding-left: 1rem; margin-bottom: 1.5rem; }
.thread-list { list-style: none; }
.thread-item { padding: 1rem; border-bottom: 1px solid #e0e0e0; transition: background 0.3s; }
.thread-item:hover { background: #f8f9fa; }

/* GROUPS */
.group-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.group-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

/* BADGES */
.badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 12px; font-size: 0.875rem; font-weight: 600; }
.badge-primary { background: #667eea; color: white; }
.badge-success { background: #28a745; color: white; }
.badge-danger  { background: #dc3545; color: white; }

/* DASHBOARD */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.dashboard-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* ============================================================
   MOBILE - 768px
============================================================ */
@media (max-width: 768px) {
    header { padding: 1rem 0 0 0; }
    .logo h1 { font-size: 1.8rem; }
    .logo-tagline { font-size: 0.85rem; }
    .logo img { max-width: 220px; }

    /* Show hamburger */
    .hamburger { display: flex; }

    /* Hide nav by default on mobile */
    nav { display: none; border-top: 2px solid #eee; padding: 0; }
    nav.open { display: block; }

    nav ul { flex-direction: column; gap: 0; text-align: left; }
    nav ul li { border-bottom: 1px solid #f0f0f0; }
    nav ul li:last-child { border-bottom: none; }
    nav ul li a { padding: 0.85rem 1.5rem; font-size: 1rem; }
    nav ul li a:hover { background: #f8f9fa; }

    .card { padding: 1.25rem; }
    .container { padding: 12px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .stat-number { font-size: 1.8rem; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .btn { padding: 0.65rem 1.2rem; font-size: 0.95rem; }
    .flex { flex-wrap: wrap; }
    table { font-size: 0.85rem; }
    table th, table td { padding: 0.5rem; }
    .justify-between { flex-direction: column; gap: 0.5rem; }
}

/* ============================================================
   EXTRA SMALL - 480px
============================================================ */
@media (max-width: 480px) {
    .logo h1 { font-size: 1.5rem; }
    .logo img { max-width: 180px; }
    .stats-grid { grid-template-columns: 1fr; }
    .card { padding: 1rem; border-radius: 8px; }
    .btn { font-size: 0.9rem; padding: 0.6rem 1rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.1rem; }
}
