* {
    box-sizing: border-box;
    font-family: "Segoe UI", system-ui, sans-serif;
}

body {
    margin: 0;
    background: #f4f6f9;
    color: #1e1e1e;
}

/* LOGIN */
.login-box {
    width: 340px;
    margin: 120px auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 20px;
}

.login-box input {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
}

/*.btn {
    width: 100%;
    padding: 10px;
    background: #0176d3;
    color: white;
    border: none;
    cursor: pointer;
}*/

.btn {
    display: inline-block;
    padding: 10px 16px;
    background: #0176d3;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
}

.btn:hover {
    background: #1a252f;
}

.error {
    color: red;
    text-align: center;
}

/* TOPBAR */
.topbar {
    height: 56px;
    background: #0176d3;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.topbar a {
    color: white;
    margin-left: 10px;
    text-decoration: none;
}

/* LAYOUT */
.layout {
    display: flex;
}

.sidebar {
    width: 220px;
    background: white;
    height: calc(100vh - 56px);
    border-right: 1px solid #ddd;
    padding: 15px;
}

.sidebar a {
    display: block;
    padding: 10px;
    margin-bottom: 5px;
    color: #0176d3;
    text-decoration: none;
}

.sidebar a:hover {
    background: #eef4ff;
}

.content {
    padding: 30px;
    flex: 1;
}

.container {
    padding: 30px;
}

.subtitle {
    color: #666;
    margin-bottom: 20px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

.card h3 {
    margin-top: 0;
}

.card button {
    margin-top: 10px;
    background: #0176d3;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
}

.card.admin {
    border: 2px solid #6c8cff;
}

/* ===== Tabla de usuarios ===== */
.users-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px; /* espacio entre filas */
}

.users-table thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 14px;
    color: #555;
}

.users-table tbody tr {
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
}

.users-table td {
    padding: 14px 16px;
    vertical-align: middle;
    font-size: 14px;
}

/* Columnas específicas */
.users-table td:nth-child(1) {
    width: 60px;
    color: #999;
}

.users-table td:nth-child(3) {
    font-family: monospace;
    color: #444;
}

.users-table td:nth-child(4) {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
}

/* Acciones */
.users-table a {
    margin-right: 10px;
    text-decoration: none;
    font-weight: 500;
}

.users-table a:hover {
    text-decoration: underline;
}

/* Responsive simple */
@media (max-width: 900px) {
    .users-table thead {
        display: none;
    }

    .users-table tbody tr {
        display: block;
        padding: 10px;
    }

    .users-table td {
        display: block;
        padding: 6px 0;
    }

    .users-table td::before {
        content: attr(data-label);
        font-weight: bold;
        display: block;
        color: #777;
        margin-bottom: 2px;
    }
}

/* === PROJECT CARD === */
.project-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    position: relative;
}

/* Estado */
.project-status {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

/* Estados */
.status-pendiente {
    background: #7f8c8d;
}

.status-en-curso {
    background: #2980b9;
}

.status-finalizado {
    background: #27ae60;
}

/* Título */
.project-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.4rem;
    color: #2c3e50;
}

/* Descripción */
.project-description {
    background: #f8f9fb;
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 14px;
    line-height: 1.5;
}

/* Archivos */
.project-files ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.project-files li {
    margin-bottom: 4px;
}

/* Fechas */
.project-dates {
    display: flex;
    gap: 24px;
    font-size: 0.9rem;
    color: #555;
    margin: 14px 0;
}

/* Acciones */
.project-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
}

/* Botones */
.btn {
    padding: 8px 14px;
    border-radius: 6px;
    background: #2c3e50;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn:hover {
    background: #1a252f;
}

.btn-secondary {
    background: #7f8c8d;
}

.btn-danger {
    background: #c0392b;
}

.form-vertical {
    max-width: 700px;
    margin-top: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 8px 10px;
    font-size: 14px;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

.filter-bar select {
    padding: 6px 10px;
}

.filter-bar label {
    font-weight: 600;
}
