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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

/* Estilo específico para página de login com imagem de fundo */
body.login-page {
    background-image: url('/static/images/login-bg.jpg');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding: 0;
    position: relative;
}

body.login-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(26, 26, 26, 0.7) 100%),
                rgba(0, 0, 0, 0.3);
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

header h1 {
    color: #000000;
    font-size: 2em;
}

.messages {
    margin-bottom: 20px;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    color: #ffffff;
}

.alert-success {
    background: rgba(212, 237, 218, 0.9);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: rgba(248, 215, 218, 0.9);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: rgba(255, 243, 205, 0.9);
    color: #856404;
    border: 1px solid #ffeaa7;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    transition: all 0.3s;
    font-weight: 500;
}

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

.btn-primary:hover {
    background: #333333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Botão Entrar na página de login - cinza claro com letras pretas */
.auth-box .btn-primary {
    background: #e0e0e0;
    color: #000000;
    border: 1px solid #ccc;
}

.auth-box .btn-primary:hover {
    background: #d0d0d0;
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-warning:hover {
    background: #e0a800;
}

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

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

.clientes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Tabela de clientes em linha */
.clientes-table-container {
    margin-top: 20px;
    overflow-x: auto;
}

.clientes-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.clientes-table thead {
    background: #000000;
    color: white;
}

.clientes-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
}

.clientes-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.clientes-table tbody tr:hover {
    background-color: #f5f5f5;
    cursor: pointer;
}

.clientes-table td {
    padding: 15px;
    vertical-align: middle;
}

.codigo-cell {
    font-weight: bold;
    color: #000000;
    font-family: 'Courier New', monospace;
    width: 80px;
}

.nome-cell {
    font-weight: 600;
    color: #000000;
}

.contato-cell {
    color: #666;
}

.status-cell {
    width: 100px;
}

.actions-cell {
    width: 350px;
    white-space: nowrap;
}

.actions-cell .btn {
    margin-right: 5px;
    margin-bottom: 5px;
}

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

.cliente-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: #f9f9f9;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cliente-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

.cliente-header h2 {
    color: #000000;
    font-size: 1.5em;
}

.status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-ativo {
    background: #d4edda;
    color: #155724;
}

.status-inativo {
    background: #f8d7da;
    color: #721c24;
}

.status-suspenso {
    background: #fff3cd;
    color: #856404;
}

.cliente-info p {
    margin: 8px 0;
    color: #666;
}

.cliente-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.form-cadastro {
    max-width: 600px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.cliente-detalhes {
    display: grid;
    gap: 20px;
}

.info-box,
.documentos-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.info-box h2,
.documentos-box h2 {
    color: #000000;
    margin-bottom: 15px;
}

.info-box p {
    margin: 10px 0;
    color: #666;
}

.documentos-list {
    list-style: none;
}

.documentos-list li {
    margin: 10px 0;
    padding: 10px;
    background: white;
    border-radius: 5px;
    border-left: 3px solid #000000;
}

.documentos-list a {
    color: #000000;
    text-decoration: none;
    font-size: 1.1em;
    display: block;
}

.documentos-list a:hover {
    text-decoration: underline;
}

/* Estilos de Autenticação */
.auth-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    padding: 20px 60px;
    position: relative;
    z-index: 1;
}

.auth-box {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.5);
    max-width: 420px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

.auth-box h1 {
    color: #ffffff;
    text-align: center;
    margin-bottom: 10px;
    font-size: 2em;
}

.auth-box h2 {
    color: #ffffff;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5em;
}

.auth-form {
    margin-top: 20px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #ffffff;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transition: border-color 0.3s, background 0.3s;
}

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

.auth-form input:focus {
    outline: none;
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.btn-block {
    width: 100%;
    margin-top: 10px;
}

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

.auth-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

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

/* Menu de Usuário */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 15px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-admin {
    background: #000000;
    color: white;
}

.badge-user {
    background: #6c757d;
    color: white;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background-color: #17a2b8;
    color: white;
}

/* Estilos para campos de senha com ícone de olho */
.password-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    padding-right: 40px;
    width: 100%;
}

.campo-credencial .password-wrapper,
.form-group .password-wrapper {
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #666;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #000;
}

.password-toggle:focus {
    outline: none;
    color: #000;
}

.password-toggle .eye-icon {
    display: inline-block;
}

.password-toggle .eye-off-icon {
    display: none;
}

.password-toggle.showing .eye-icon {
    display: none;
}

.password-toggle.showing .eye-off-icon {
    display: inline-block;
}

.password-copy-hint {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 10;
}

.password-wrapper:hover .password-copy-hint {
    opacity: 1;
}

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

/* Tabela de Usuários */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.data-table thead {
    background: #000000;
    color: white;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

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

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

.form-container {
    max-width: 600px;
    margin: 0 auto;
}

.form {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input[type="checkbox"] {
    width: auto;
}

/* Responsividade */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-actions {
        justify-content: flex-start;
        width: 100%;
    }
    
    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .user-menu {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    header h1 {
        font-size: 1.5em;
    }
    
    .clientes-grid {
        grid-template-columns: 1fr;
    }
    
    .clientes-table-container {
        overflow-x: auto;
    }
    
    .clientes-table {
        font-size: 12px;
    }
    
    .clientes-table th,
    .clientes-table td {
        padding: 10px 8px;
    }
    
    .actions-cell {
        width: auto;
    }
    
    .actions-cell .btn {
        font-size: 11px;
        padding: 4px 8px;
        margin-right: 3px;
    }
    
    .cliente-actions {
        flex-direction: column;
    }
    
    .cliente-actions .btn {
        width: 100%;
        text-align: center;
    }
    
    .auth-container {
        padding: 20px;
        justify-content: center;
    }
    
    .auth-box {
        padding: 30px 20px;
        max-width: 100%;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px;
    }
}
