/* public/styles.css */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
    --primary-green: #10a37f;
    /* Approximate green from "Buscar Cliente" title */
    --button-gradient-start: #2ab661;
    --button-gradient-end: #0dbce1;
    --background: #f0f2f5;
    --surface: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
    --error: #e74c3c;
    --success: #2ecc71;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navbar */
nav {
    background-color: var(--surface);
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    /* Adjust as necessary to match visual design */
    width: auto;
}

nav .links a {
    margin-left: 20px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
}

nav .links a:hover {
    color: var(--primary-green);
}

/* Main Container */
.container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 60px;
    /* Space from top */
}

/* The White Card Interface (from screenshots) */
.card {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-sizing: border-box;
}

.card h2 {
    text-align: center;
    color: var(--primary-green);
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 700;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-primary);
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--primary-green);
}

/* Gradient Button */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, var(--button-gradient-start) 0%, var(--button-gradient-end) 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 10px;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: #e0e0e0;
    color: var(--text-primary);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
}

.btn-danger {
    background: var(--error);
    color: white;
}

/* Alerts */
.alert {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

.alert-error {
    background-color: #fdeaea;
    color: var(--error);
    border: 1px solid #fad2d2;
}

.alert-success {
    background-color: #e9f9ef;
    color: var(--success);
    border: 1px solid #c3edd3;
}

/* Results List */
.result-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.result-item strong {
    display: block;
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.result-item span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Tables for Users */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 500;
    color: var(--text-secondary);
}

/* Icon Buttons */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    color: white;
    margin: 0 4px;
    transition: opacity 0.2s;
}

.btn-icon:hover {
    opacity: 0.8;
}

.btn-icon:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bg-red {
    background-color: #e74c3c;
}

.bg-blue {
    background-color: #3498db;
}

.bg-yellow {
    background-color: #f1c40f;
    color: #333;
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

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

.modal-content {
    background: var(--surface);
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

/* Spinner */
.spinner {
    display: none;
    width: 32px;
    height: 32px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-green);
    animation: spin 1s ease-in-out infinite;
    margin: 15px auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}