* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f4f4f2;
    color: #2c2c2a;
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-box {
    background: #ffffff;
    padding: 3.5rem 2.5rem;
    border-radius: 16px;
    border: 1px solid #ece9e0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 360px;
}

.brand-splash {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.75rem;
}

.brand-icon-img {
    width: 56px;
    height: auto;
}

.brand-name {
    font-size: 22px;
    font-weight: 700;
    color: #2b2b28;
    margin: 0;
}

.brand-name span {
    color: #f5cb4a;
}

.login-logo {
    display: block;
    height: 56px;
    width: auto;
    margin: 0 auto 1rem;
    border-radius: 12px;
}

form label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    margin-top: 1rem;
    color: #000000;
    font-weight: 600;
}

form input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d4ab2e;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
}

form input:focus {
    outline: none;
    border-color: #412402;
    box-shadow: 0 0 0 3px rgba(65,36,2,0.15);
}

form button {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.7rem;
    background: #f5cb4a;
    color: #2b2b28;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

form button:hover { background: #d4ab2e; }

.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: #fcebeb;
    color: #791f1f;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #ece9e0;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0 0.25rem;
    margin-bottom: 1.75rem;
    text-align: center;
}

.sidebar-icon {
    height: 34px;
    width: auto;
}

.sidebar-wordmark {
    font-weight: 700;
    font-size: 15px;
    color: #2b2b28;
}

.sidebar-wordmark span {
    color: #f5cb4a;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.55rem 0.6rem;
    border-radius: 8px;
    text-decoration: none;
    color: #5f5e5a;
    font-size: 0.9rem;
    font-weight: 500;
}

.sidebar-nav-item .icon {
    font-size: 1rem;
}

.sidebar-nav-item.active {
    background: #fdf3da;
    color: #8a6a12;
    font-weight: 600;
}

.sidebar-bottom {
    margin-top: auto;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.55rem 0.6rem;
    border-radius: 8px;
    text-decoration: none;
    color: #8a2f2f;
    font-size: 0.9rem;
}

.sidebar-user {
    border-top: 1px solid #ece9e0;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 0.6rem;
}

.sidebar-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f5cb4a;
    color: #2b2b28;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar-email {
    font-size: 0.78rem;
    color: #5f5e5a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: #2b2b28;
}

main {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.search-box { flex: 1; min-width: 220px; max-width: 380px; }

.search-box input {
    width: 100%;
    padding: 0.55rem 0.8rem;
    border: 1px solid #ddd9cd;
    border-radius: 8px;
    font-size: 0.9rem;
}

.search-box input:focus {
    outline: none;
    border-color: #f5cb4a;
    box-shadow: 0 0 0 3px rgba(245,203,74,0.25);
}

.filters {
    margin-bottom: 0;
    margin-left: auto;
}

.filters a {
    display: inline-block;
    padding: 0.5rem 1.1rem;
    margin-left: 0.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: #444441;
    background: #fff;
    border: 1px solid #ddd9cd;
    font-size: 0.85rem;
}

.filters a.active {
    background: #f5cb4a;
    border-color: #f5cb4a;
    color: #412402;
    font-weight: 600;
}

.table-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #ece9e0;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 0.22rem 1rem;
    text-align: left;
    font-size: 0.88rem;
    vertical-align: middle;
}

.data-table td:first-child {
    font-weight: 600;
}

.data-table td:last-child {
    text-align: center;
}

.foto-cell {
    text-align: center;
    padding-left: 0.3rem !important;
    padding-right: 0.3rem !important;
}

.foto-cell a {
    text-decoration: none;
    font-size: 1rem;
    cursor: pointer;
}

.foto-vazia {
    opacity: 0.2;
    font-size: 1rem;
}

.data-table th {
    background: #faf9f5;
    font-weight: 600;
    color: #5f5e5a;
    border-bottom: 1px solid #ece9e0;
}

.data-table tbody tr {
    border-top: 1px solid #f1efe8;
}

.data-table tbody tr:nth-child(even) {
    background: #fbfaf6;
}

.data-table tbody tr:hover {
    background: #fdf6e8;
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.9rem;
    font-size: 0.85rem;
    color: #5f5e5a;
}

.pagination-controls { display: flex; gap: 4px; }

.pagination-controls button {
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
    border: 1px solid #ddd9cd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
}

.pagination-controls button.ativo {
    background: #f5cb4a;
    border-color: #f5cb4a;
    color: #412402;
    font-weight: 600;
}

.pagination-controls button:disabled {
    opacity: 0.4;
    cursor: default;
}

.pagination-ellipsis {
    padding: 0.35rem 0.3rem;
    color: #888780;
}

.empty {
    text-align: center;
    color: #888780;
    margin-top: 3rem;
}

.form-etiqueta {
    margin: 0;
    display: inline-block;
}

.btn-etiqueta {
    padding: 0.35rem 0.8rem;
    font-size: 0.8rem;
    border: 1px solid #f5cb4a;
    background: #faeeda;
    color: #633806;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-etiqueta:hover {
    background: #fac775;
}
