/* 
 * FILE: css/style.css
 * PURPOSE: DeskFlow Visual Identity (Post-it Style)
 */

:root {
    --bg-body: #f4f7f6;
    --text-main: #2c3e50;
    --text-light: #7f8c8d;
    
    /* Cores dos Post-its */
    --postit-yellow: #fff9c4;
    --postit-blue: #e1f5fe;
    --postit-green: #e8f5e9;
    --postit-pink: #fce4ec;
    --postit-orange: #ffe0b2;
    
    --primary: #2980b9;
    --success: #27ae60;
    --danger: #c0392b;
    
    --shadow: 0 2px 5px rgba(0,0,0,0.1);
    --radius: 8px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    padding-bottom: 80px; /* Espaço para o FAB */
}

/* --- Layout Containers --- */
.container { max-width: 1000px; margin: 0 auto; padding: 15px; }

/* --- Auth Pages --- */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #ece9e6, #ffffff);
}
.auth-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}
.logo-area { font-size: 1.8rem; font-weight: 800; color: var(--text-main); margin-bottom: 10px; }
.subtitle { color: var(--text-light); margin-bottom: 30px; }

/* --- Header da Mesa --- */
.desk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}
.user-welcome h1 { margin: 0; font-size: 1.4rem; }
.user-welcome small { color: var(--text-light); }

/* --- Tabs (Filtros) --- */
.tabs { display: flex; gap: 10px; margin-bottom: 20px; overflow-x: auto; }
.tab-btn {
    padding: 8px 16px;
    border: none;
    background: #e0e0e0;
    border-radius: 20px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    white-space: nowrap;
}
.tab-btn.active { background: var(--text-main); color: white; }

/* --- Grid de Post-its --- */
.desk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); /* Cards quadrados */
    gap: 15px;
}

.postit {
    background: var(--postit-yellow); /* Padrão */
    padding: 15px;
    border-radius: 2px; /* Borda levemente quadrada como papel */
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    position: relative;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border-top: 10px solid rgba(0,0,0,0.05); /* "Cola" do post-it */
}

.postit:active { transform: scale(0.98); }

/* Cores Variáveis */
.color-yellow { background-color: var(--postit-yellow); }
.color-blue { background-color: var(--postit-blue); }
.color-green { background-color: var(--postit-green); }
.color-pink { background-color: var(--postit-pink); }
.color-orange { background-color: var(--postit-orange); }

.postit-title { font-weight: bold; font-size: 1.1rem; margin-bottom: 5px; line-height: 1.2; }
.postit-desc { font-size: 0.9rem; color: rgba(0,0,0,0.7); flex-grow: 1; overflow: hidden; text-overflow: ellipsis; }
.postit-meta { font-size: 0.75rem; color: rgba(0,0,0,0.5); margin-top: 10px; text-align: right; }

/* --- Formulários --- */
.form-group { margin-bottom: 15px; text-align: left; }
label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 0.9rem; }
input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-size: 16px; /* Evita zoom no iOS */
    background: #f9f9f9;
}
textarea { resize: vertical; min-height: 100px; }

/* --- Botões --- */
.btn { padding: 12px 20px; border: none; border-radius: var(--radius); font-weight: bold; cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
.btn-block { display: block; width: 100%; }
.btn-primary { background: var(--primary); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-secondary { background: #95a5a6; color: white; }
.btn-sm { padding: 5px 10px; font-size: 0.8rem; }

/* --- FAB (Floating Action Button) --- */
.fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--text-main);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 100;
    border: none;
}

/* --- Modal --- */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 200; align-items: center; justify-content: center; }
.modal.active { display: flex; }
.modal-content { background: white; padding: 20px; border-radius: 12px; width: 90%; max-width: 500px; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; margin-bottom: 20px; }
.close-modal { background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* Seletor de Cores */
.color-selector { display: flex; gap: 10px; margin-top: 5px; }
.color-option { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.color-option.selected { border-color: #333; transform: scale(1.1); }

/* Lista de Usuários (Admin) */
.card-list { display: flex; flex-direction: column; gap: 10px; }
.user-card { background: white; padding: 15px; border-radius: var(--radius); display: flex; justify-content: space-between; align-items: center; border: 1px solid #eee; }
.user-card.inactive { border-left: 4px solid var(--danger); }
.badge-ok { color: var(--success); font-weight: bold; font-size: 0.8rem; }