* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    color: #1a1a1a;
}

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e5e5e5;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
}

.sidebar .brand {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 28px;
}

.sidebar .brand span {
    color: #5b6cff;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.sidebar nav a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.sidebar nav a:hover {
    background: #f0f0f0;
}

.sidebar nav a.active {
    background: #ecebff;
    color: #4a3dff;
    font-weight: 500;
}

.sidebar .logout {
    font-size: 13px;
    color: #888;
    text-decoration: none;
}

.content {
    flex: 1;
    padding: 40px;
    max-width: 900px;
}

.content h1 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 4px;
}

.subtitle {
    font-size: 13px;
    color: #767676;
    margin: 0 0 20px;
}

.card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.card h2 {
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 14px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 14px;
}

button, .btn {
    background: #111;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

button.secondary, .btn.secondary {
    background: #f0f0f0;
    color: #1a1a1a;
}

button.danger, .btn.danger {
    background: #fdeceb;
    color: #c0392b;
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 4px;
    border-bottom: 1px solid #eee;
}

.row:last-child {
    border-bottom: none;
}

.row-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.row-actions button, .row-actions .btn {
    font-size: 12px;
    padding: 6px 10px;
}

.badge {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 999px;
}

.badge.ok { background: #e6f7ed; color: #1e8e4e; }
.badge.off { background: #fdf3e3; color: #b3760b; }

.error {
    background: #fdeceb;
    color: #c0392b;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

#preview-card { transition: background 0.15s; }
#preview-card.claro { color: #2E333A; }
#preview-card.oscuro { color: #fff; }
#preview-card .preview-muted { opacity: 0.75; }

.dropzone {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    margin-bottom: 14px;
    transition: border-color 0.15s, background 0.15s;
}

.dropzone.over {
    border-color: #4a3dff;
    background: #f5f4ff;
}

.dropzone label {
    cursor: pointer;
    font-size: 13px;
    color: #666;
    font-weight: 400;
    margin: 0;
    display: block;
}

.dropzone .mas {
    display: block;
    font-size: 22px;
    line-height: 1;
    color: #999;
    margin-bottom: 6px;
    font-weight: 300;
}

.empty {
    font-size: 13px;
    color: #888;
    padding: 8px 4px;
}
