* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3b82f6;
    --secondary-color: #64748b;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.hero {
    text-align: center;
    padding: 3rem 0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-4px);
}

.card h2 {
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-block {
    width: 100%;
}

.form-container, .login-container {
    max-width: 500px;
    margin: 2rem auto;
}

.login-box {
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.table-container {
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table thead {
    background-color: var(--background);
}

.empty-state {
    padding: 3rem;
    text-align: center;
    color: var(--text-secondary);
}

footer {
    background-color: var(--surface);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-secondary);
}


/* Mejoras para tabla de clientes */
.table-footer {
    padding: 1rem;
    background-color: var(--background);
    border-top: 1px solid var(--border-color);
    text-align: right;
}

.form-header {
    margin-bottom: 2rem;
}

.form-header h1 {
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-secondary);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.empty-state p:first-child {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}


/* Estilos para autenticación */
.user-info {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--background);
    border-radius: 6px;
}

.user-info span {
    color: var(--text-primary);
    font-weight: 500;
}

.btn-logout {
    color: var(--danger-color, #ef4444) !important;
    font-weight: 600;
}

.btn-logout:hover {
    color: #dc2626 !important;
}

/* Alertas */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.alert-error {
    background-color: #fee2e2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

.alert-warning {
    background-color: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
}

.alert-error p, .alert-warning p {
    margin: 0.5rem 0;
}

/* Caja de éxito */
.success-box {
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.info-section {
    background-color: var(--background);
    padding: 1.5rem;
    border-radius: 6px;
    margin: 1.5rem 0;
}

.info-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.info-section p {
    margin: 0.5rem 0;
}

.password-temporal {
    background-color: #fef3c7;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: bold;
    color: #92400e;
    display: inline-block;
    margin-left: 0.5rem;
}
