/* Variables CSS para marca blanca */
:root {
    --color-primary: #667eea;
    --color-secondary: #764ba2;
    --color-success: #28a745;
    --color-danger: #dc3545;
    --color-warning: #ffc107;
    --color-info: #17a2b8;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: var(--color-primary);
    font-size: 2rem;
    font-weight: bold;
}

nav {
    display: flex;
    gap: 1rem;
}

nav button {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

nav button:hover {
    background: #5a6fd8;
}

/* Main content */
main {
    flex: 1;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Login/Register forms */
.login-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #667eea;
}

.login-container form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-container input {
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.login-container input:focus {
    outline: none;
    border-color: #667eea;
}

.login-container button {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.login-container button:hover {
    background: #5a6fd8;
}

.login-container p {
    text-align: center;
    margin-top: 1rem;
}

.login-container a {
    color: #667eea;
    text-decoration: none;
}

.login-container a:hover {
    text-decoration: underline;
}

/* Main content sections */
#main-content {
    width: 100%;
    max-width: 1200px;
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.content-section h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e1e5e9;
    padding-bottom: 0.5rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

table th,
table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #667eea;
}

table tr:hover {
    background: #f8f9fa;
}

/* Buttons */
button {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    margin-right: 0.5rem;
}

button:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-content h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-content input,
.modal-content textarea,
.modal-content select {
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.modal-content input:focus,
.modal-content textarea:focus,
.modal-content select:focus {
    outline: none;
    border-color: #667eea;
}

.modal-content textarea {
    resize: vertical;
    min-height: 100px;
}

/* Responsive design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    main {
        padding: 1rem;
    }

    table {
        font-size: 0.9rem;
    }

    table th,
    table td {
        padding: 0.5rem;
    }

    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error messages */
.message {
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    text-align: center;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}