:root {
    --primary-color: #34495e;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --background-color: #ecf0f1;
    --text-color: #333;
    --light-text: #fff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.sidebar h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}

.sidebar ul {
    list-style-type: none;
}

.sidebar ul li {
    margin-bottom: 0.5rem;
}

.sidebar ul li a {
    color: var(--light-text);
    text-decoration: none;
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.sidebar ul li a:hover {
    background-color: var(--secondary-color);
    transform: translateX(5px);
}

.content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

header {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

header h1 {
    margin-bottom: 0.5rem;
}

nav ul {
    list-style-type: none;
    display: flex;
    flex-wrap: wrap;
}

nav ul li {
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

nav ul li a {
    color: var(--light-text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

main {
    padding: 2rem 0;
}

h1, h2, h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.login-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 2rem;
    max-width: 400px;
    margin: 2rem auto;
}

.login-container h2 {
    text-align: center;
    color: var(--primary-color);
}

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

.login-container form div {
    margin-bottom: 1rem;
    position: relative;
}

.login-container label {
    display: block;
    margin-bottom: 0.5rem;
}

.login-container input[type="email"],
.login-container input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.login-container button {
    background-color: var(--secondary-color);
    color: var(--light-text);
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1rem;
}

.login-container button:hover {
    background-color: #2980b9;
}

.error {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.widget {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

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

.widget h3 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.toggle-password {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 0.9em;
    padding: 0.5rem;
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Estilos para tablas */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background-color: #fff;
    box-shadow: var(--shadow);
}

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

th {
    background-color: var(--primary-color);
    color: var(--light-text);
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #e9ecef;
}

/* Estilos para formularios */
form {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--secondary-color);
    color: var(--light-text);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2c3e50;
}

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

.btn-danger:hover {
    background-color: #c0392b;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        margin-bottom: 1rem;
    }

    .content {
        padding: 1rem;
    }

    nav ul {
        flex-direction: column;
    }

    nav ul li {
        margin-bottom: 0.5rem;
    }

    .dashboard-widgets {
        grid-template-columns: 1fr;
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        border: 1px solid #ccc;
        margin-bottom: 0.5rem;
    }

    td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
    }

    td:before {
        position: absolute;
        top: 6px;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        content: attr(data-label);
        font-weight: bold;
    }
}