/* Sinpesca — tema dinâmico */

:root {
    --primary:       #cfba00;
    --primary-hover: #bba600;
    --secondary:     #64748b;

    --bg-main:       #02961d;
    --bg-card:       #ffffff;
    --bg-sidebar:    #000000;

    --text-main:     #000000;
    --text-muted:    #64748b;
    --text-light:    #94a3b8;

    --sidebar-text:  #f1f5f9;
    --sidebar-muted: #94a3b8;

    --success:       #10b981;
    --warning:       #f59e0b;
    --danger:        #ef4444;
    --info:          #3b82f6;

    --border-color:  #e2e8f0;
    --input-border:  #cbd5e1;
    --shadow-sm:     0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md:     0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg:     0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --radius:        8px;
    --radius-lg:     12px;
    --container-max: 1200px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-weight: 600; color: var(--text-main); }

.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 1.5rem; }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
}

.form-group { margin-bottom: 1.25rem; }

label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; color: var(--text-main); }

input, select, textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.95rem;
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
    background-color: var(--bg-card);
    transition: all 0.2s;
    color: var(--text-main);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.625rem 1.25rem; font-size: 0.875rem; font-weight: 500;
    border-radius: var(--radius); cursor: pointer; transition: all 0.2s;
    border: 1px solid transparent; gap: 0.5rem; text-decoration: none;
}
.btn-primary { background-color: var(--primary); color: #fff; }
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-outline { background-color: transparent; border-color: var(--border-color); color: var(--text-main); }
.btn-outline:hover { background-color: var(--bg-main); }
.btn-danger { background-color: #fee2e2; color: #991b1b; }
.btn-danger:hover { background-color: #fecaca; }

.table-container { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border-color); background: var(--bg-card); }
table { width: 100%; border-collapse: collapse; }
th { background: var(--bg-main); padding: 0.75rem 1rem; text-align: left; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); border-bottom: 1px solid var(--border-color); }
td { padding: 1rem; font-size: 0.875rem; border-bottom: 1px solid var(--border-color); color: var(--text-main); }
tr:last-child td { border-bottom: none; }
tr:hover td { background-color: var(--bg-main); }

.badge { display: inline-flex; padding: 0.25rem 0.625rem; font-size: 0.75rem; font-weight: 500; border-radius: 9999px; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }

.alert { padding: 1rem; border-radius: var(--radius); margin-bottom: 1.5rem; font-size: 0.875rem; display: flex; align-items: center; gap: 0.75rem; }
.alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); }

/* Sidebar usa variável */
.sidebar { background: var(--bg-sidebar) !important; }
.sidebar-logo { color: var(--primary) !important; }
.sidebar-nav a { color: var(--sidebar-muted) !important; }
.sidebar-nav a:hover, .sidebar-nav a.active { background: rgba(255,255,255,0.05); color: var(--sidebar-text) !important; }

.grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
