/* ============================================================
   style.css - Todos os estilos do Volmanday
   ============================================================ */

/* --- Reset e Estilos Globais --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
}

/* ============================================================
   LOGO COM IMAGEM PERSONALIZADA (simbolicon.png)
   ============================================================ */

.logo-icon {
    background: rgba(50, 50, 50, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: white;
    font-weight: 700;
    font-size: 20px;
    padding: 4px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.logo-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.logo-img {
    width: 120%;
    height: 120%;
    object-fit: contain;
    display: block;
    margin: -10%;
}

/* Ajuste para o logo no auth-box (login/cadastro) - MAIOR */
.auth-logo .logo-icon {
    width: 60px;
    height: 60px;
    padding: 6px;
    background: rgba(50, 50, 50, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-logo .logo-icon .logo-img {
    width: 130%;
    height: 130%;
    object-fit: contain;
    margin: -15%;
}

body {
    background-color: #f5f6f8;
    color: #1a1a1a;
    padding: 24px;
    min-height: 100vh;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Cabeçalho --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-text {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.logo-text span {
    color: #F57C00;
}

.admin-badge {
    background: #F57C00;
    color: white;
    font-size: 12px;
    padding: 2px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.stats {
    display: flex;
    gap: 24px;
    background: white;
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-weight: 700;
    font-size: 18px;
    color: #F57C00;
}

.stat-label {
    font-size: 13px;
    color: #6b6f76;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 8px 16px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.user-info #userName {
    font-weight: 500;
    font-size: 14px;
    color: #1a1a1a;
}

/* --- Barra de Ferramentas --- */
.toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-primary {
    background: #F57C00;
    color: white;
}

.btn-primary:hover {
    background: #E65100;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 124, 0, 0.3);
}

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

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

.btn-outline {
    background: transparent;
    color: #1a1a1a;
    border: 1.5px solid #e1e4e8;
}

.btn-outline:hover {
    background: #f5f6f8;
    border-color: #b0b8c1;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* --- Filtros --- */
.filter-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 14px;
    border: 1.5px solid #e1e4e8;
    border-radius: 20px;
    background: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    color: #4a4a4a;
}

.filter-btn:hover {
    border-color: #F57C00;
    color: #F57C00;
}

.filter-btn.active {
    background: #F57C00;
    color: white;
    border-color: #F57C00;
}

/* --- Board --- */
.board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 8px;
}

.column {
    background: #f0f1f4;
    border-radius: 16px;
    padding: 16px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    transition: 0.2s;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.06);
}

.column-title {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.column-count {
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* --- Cards --- */
.task-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100px;
}

.task-card {
    background: white;
    padding: 14px 16px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    border-left: 4px solid #F57C00;
    transition: 0.2s;
    cursor: grab;
    position: relative;
    animation: fadeIn 0.25s ease;
}

.task-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.task-card:active {
    cursor: grabbing;
}

.task-title {
    font-weight: 500;
    font-size: 15px;
    margin-bottom: 2px;
    color: #1a1a1a;
}

.task-date {
    font-size: 11px;
    color: #8c929a;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-criador {
    font-size: 12px;
    color: #4a4a4a;
    margin-bottom: 4px;
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    margin-bottom: 6px;
}

.task-responsavel {
    font-size: 12px;
    color: #4a4a4a;
    margin-bottom: 4px;
    display: inline-block;
    background: #fff3e0;
    padding: 2px 10px;
    border-radius: 12px;
    margin-bottom: 6px;
    transition: all 0.2s ease;
}

.task-responsavel strong {
    color: #F57C00;
}

.task-responsavel:hover {
    transform: scale(1.02);
}

/* --- Subtarefas --- */
.task-subtasks {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #e1e4e8;
}

.subtask-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #4a4a4a;
    padding: 2px 0;
}

.subtask-item input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: #F57C00;
}

.subtask-item .subtask-text {
    flex: 1;
}

.subtask-item .subtask-text.done {
    text-decoration: line-through;
    color: #8c929a;
}

/* --- Meta (tags + ações) --- */
.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #6b6f76;
    margin-top: 6px;
}

.task-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.tag {
    background: #eef2f7;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    color: #1a1a1a;
}

.tag.urgent {
    background: #ffd6d6;
    color: #b33636;
}

.tag.important {
    background: #fff3d6;
    color: #b37a36;
}

.tag.tranquilo {
    background: #d6eeff;
    color: #0066cc;
}

/* --- Ações do card --- */
.task-actions {
    display: flex;
    gap: 4px;
}

.task-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: 0.15s;
    color: #6b6f76;
}

.task-actions button:hover {
    background: #f0f1f4;
    color: #1a1a1a;
}

.task-actions .delete-btn:hover {
    color: #ff4d4f;
    background: #ffebee;
}

.task-actions .edit-btn:hover {
    color: #F57C00;
    background: #fff3e0;
}

/* --- Drag & Drop --- */
.column.drag-over {
    background: #e3e9f5;
    border: 2px dashed #F57C00;
}

/* --- Estado vazio --- */
.empty-state {
    color: #8c929a;
    font-size: 14px;
    text-align: center;
    padding: 30px 10px;
    border: 1.5px dashed #d0d4da;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.4);
}

/* --- Animações --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeInModal 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-large {
    max-width: 600px;
}

.modal-small {
    max-width: 420px;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 22px;
    color: #1a1a1a;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b6f76;
    transition: 0.2s;
    padding: 0 8px;
}

.modal-close:hover {
    color: #1a1a1a;
    transform: rotate(90deg);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-body label {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
}

.modal-body input[type="text"] {
    padding: 10px 14px;
    border: 1.5px solid #e1e4e8;
    border-radius: 8px;
    font-size: 15px;
    transition: 0.2s;
}

.modal-body input[type="text"]:focus {
    outline: none;
    border-color: #F57C00;
    box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.15);
}

.modal-body select {
    padding: 10px 14px;
    border: 1.5px solid #e1e4e8;
    border-radius: 8px;
    font-size: 15px;
    background: white;
    cursor: pointer;
    transition: 0.2s;
}

.modal-body select:focus {
    outline: none;
    border-color: #F57C00;
    box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.15);
}

/* --- Subtarefas no modal --- */
.subtasks-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subtasks-section label {
    margin-bottom: 0;
}

.subtask-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
    animation: fadeIn 0.2s ease;
}

.subtask-input-row input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1.5px solid #e1e4e8;
    border-radius: 6px;
    font-size: 14px;
}

.subtask-input-row input[type="text"]:focus {
    outline: none;
    border-color: #F57C00;
    box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.15);
}

.subtask-input-row .remove-subtask-btn {
    background: none;
    border: none;
    color: #ff4d4f;
    cursor: pointer;
    font-size: 18px;
    padding: 0 4px;
    transition: 0.2s;
}

.subtask-input-row .remove-subtask-btn:hover {
    transform: scale(1.2);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e1e4e8;
}

/* ============================================================
   PÁGINAS DE AUTENTICAÇÃO - COM IMAGEM PERSONALIZADA
   ============================================================ */
.auth-page {
    background: url('https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2j2aslxwtdi7f3ax7i0o.jpg') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
    position: relative;
}

/* Overlay escuro para melhor legibilidade do texto */
.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    /* Aumentei a opacidade do overlay */
    z-index: 0;
}

/* Círculos decorativos flutuantes */
.auth-page .circle-decoration {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    z-index: 0;
    pointer-events: none;
    backdrop-filter: blur(2px);
}

.auth-page .circle-decoration:nth-child(1) {
    width: 250px;
    height: 250px;
    top: -80px;
    right: -60px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-page .circle-decoration:nth-child(2) {
    width: 180px;
    height: 180px;
    bottom: -60px;
    left: -50px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

/* ============================================================
   AUTH-BOX COM EFEITO GLASSMORPHISM (TRANSPARENTE)
   ============================================================ */
.auth-box {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 40px 32px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.auth-box:hover {
    background: rgba(255, 255, 255, 0.18);
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.auth-logo .logo-text {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.auth-logo .logo-text span {
    color: #F57C00;
}

.auth-box h2 {
    text-align: center;
    font-size: 24px;
    color: #ffffff;
    margin-bottom: 4px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.auth-box p {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 24px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.auth-error {
    background: rgba(255, 235, 238, 0.9);
    color: #c62828;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    border-left: 4px solid #c62828;
    backdrop-filter: blur(4px);
}

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

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 4px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 15px;
    transition: 0.3s ease;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    backdrop-filter: blur(4px);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus {
    outline: none;
    border-color: #F57C00;
    box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.2);
    background: rgba(255, 255, 255, 0.2);
}

.auth-box .btn-primary {
    background: #F57C00;
    color: white;
    width: 100%;
    font-weight: 700;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s ease;
    box-shadow: 0 4px 16px rgba(245, 124, 0, 0.3);
}

.auth-box .btn-primary:hover {
    background: #E65100;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(245, 124, 0, 0.4);
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-links p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
}

.auth-links a {
    color: #F57C00;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s ease;
}

.auth-links a:hover {
    color: #FFB74D;
    text-decoration: underline;
}

/* ============================================================
   ADMIN
   ============================================================ */
.admin-panel {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.admin-panel h2 {
    margin-bottom: 20px;
    color: #1a1a1a;
}

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

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th {
    text-align: left;
    padding: 12px 16px;
    background: #f5f6f8;
    color: #4a4a4a;
    font-weight: 600;
    border-bottom: 2px solid #e1e4e8;
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e1e4e8;
    color: #1a1a1a;
}

.admin-table tr:hover td {
    background: #f8f9fa;
}

.admin-table .badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.admin-table .badge-tarefas {
    background: #e3f2fd;
    color: #0066cc;
}

.admin-table .badge-admin {
    background: #fff3e0;
    color: #F57C00;
}

.loading-text {
    text-align: center;
    color: #8c929a;
    padding: 40px !important;
}

.empty-text {
    text-align: center;
    color: #8c929a;
    padding: 40px !important;
}

.error-text {
    text-align: center;
    color: #ff4d4f;
    padding: 40px !important;
}

/* ============================================================
   RESPONSIVIDADE
   ============================================================ */
@media (max-width: 850px) {
    .header-right {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .user-info {
        justify-content: center;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        justify-content: center;
    }
}

@media (max-width: 700px) {
    .header {
        flex-direction: column;
        align-items: stretch;
    }

    .stats {
        flex-wrap: wrap;
        justify-content: center;
    }

    .board {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 24px;
        width: 95%;
    }

    .modal-large {
        max-width: 95%;
    }

    .subtask-input-row {
        flex-wrap: wrap;
    }

    .auth-box {
        padding: 24px 20px;
    }

    .auth-page .circle-decoration {
        display: none;
    }
}

/* ============================================================
   FILTRO POR RESPONSÁVEL
   ============================================================ */

.filter-responsavel {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.filter-responsavel label {
    font-size: 13px;
    font-weight: 500;
    color: #4a4a4a;
    white-space: nowrap;
}

.filter-responsavel select {
    padding: 6px 12px;
    border: 1.5px solid #e1e4e8;
    border-radius: 8px;
    font-size: 13px;
    background: white;
    cursor: pointer;
    transition: 0.2s;
    min-width: 120px;
}

.filter-responsavel select:focus {
    outline: none;
    border-color: #F57C00;
    box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.15);
}

/* ============================================================
   PRAZO NAS TAREFAS
   ============================================================ */

.task-prazo {
    font-size: 12px;
    margin-top: 2px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(245, 124, 0, 0.08);
    display: inline-block;
}

.task-prazo[style*="color: #ff4d4f"] {
    background: rgba(255, 77, 79, 0.1);
}

/* Estatística de atrasadas */
.stat-item:last-child .stat-number {
    color: #ff4d4f;
}

/* Responsividade do filtro */
@media (max-width: 850px) {
    .filter-responsavel {
        width: 100%;
        justify-content: center;
    }

    .filter-responsavel select {
        flex: 1;
        max-width: 200px;
    }
}

/* Tag Assistência Técnica */
.tag.assistencia {
    background: #e3f2fd;
    color: #1565C0;
    font-weight: 600;
}

/* Estatística da assistência */
#totalTasksAssist {
    color: #2196F3;
}

#completedTasksAssist {
    color: #00a86b;
}

#pendingTasksAssist {
    color: #F57C00;
}

#overdueTasksAssist {
    color: #ff4d4f;
}