/* ===== RESET E BASE ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    /* Cores Principais */
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-header: #e0e0e0;
    
    --text-primary: #252525;
    --text-secondary: #4e4e4e;
    --text-light: #999;
    
    --border-color: #ccc;
    --border-light: #e0e0e0;
    
    --accent-color: #555;
    --accent-hover: #333;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 10px rgba(0,0,0,0.05);
    --shadow-lg: 0 8px 20px rgba(0,0,0,0.1);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
}

/* Tema Escuro */
body.dark-mode {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-header: #252525;
    
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-light: #808080;
    
    --border-color: #404040;
    --border-light: #333;
    
    --accent-color: #4a9eff;
    --accent-hover: #66b0ff;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 10px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 20px rgba(0,0,0,0.5);
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Container Responsivo */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.content-wrapper {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 25px;
    margin-top: 20px;
    box-shadow: var(--shadow-md);
}

/* Imagens Responsivas */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Títulos */
h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--text-primary);
    margin-bottom: 10px;
}

h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: var(--text-primary);
    margin-bottom: 15px;
}

h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    color: var(--text-secondary);
    margin-bottom: 12px;
}

p {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: var(--text-secondary);
}

/* Utilitários */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }
    
    .content-wrapper {
        padding: 18px;
        margin-top: 12px;
    }
}

.search-box {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.user-select-box {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 6px;
    background: #fafafa;
}

.user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px;
    margin-bottom: 6px;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: 0.2s;
}

.user-item:hover {
    background: #e8f2ff;
}

.user-name {
    flex: 1;
    margin-left: 8px;
}

.role-tag {
    font-size: 12px;
    padding: 3px 6px;
    border-radius: 4px;
    margin-left: 10px;
}

.role-admin {
    background: #ffe5b4;
}

.role-user {
    background: #d4f8d4;
}

.already-group {
    font-size: 11px;
    color: #999;
    margin-left: 10px;
}