body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #111827;
    color: #f3f4f6;
}

/* HEADER */

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #1f2937;
    border-bottom: 1px solid #374151;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    width: 90px;
    height: auto;
    object-fit: contain;
}

.header-title-group h1 {
    margin: 0;
    font-size: 18px;
    color: #f9fafb;
}

.header-title-group span {
    font-size: 12px;
    color: #9ca3af;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    text-align: right;
}

.user-info strong {
    display: block;
    font-size: 14px;
}

.user-info small {
    color: #9ca3af;
}

/* BOTÓN LOGOUT */

.logout-btn {
    background: #dc2626;
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    transition: 0.2s ease;
}

.logout-btn:hover {
    background: #b91c1c;
}

/* MENÚ */

.main-menu {
    display: flex;
    gap: 8px;
    padding: 10px 20px;
    background: #111827;
    border-bottom: 1px solid #374151;
    flex-wrap: wrap;
}

.main-menu a {
    text-decoration: none;
    color: #f9fafb;
    background: #1f2937;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    transition: 0.2s ease;
}

.main-menu a:hover {
    background: #374151;
}

/* CONTENIDO */

.main-content {
    padding: 20px;
}

/* FOOTER */

.main-footer {
    margin-top: 30px;
    padding: 15px 20px;
    background: #1f2937;
    border-top: 1px solid #374151;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    color: #9ca3af;
}

/* LOGIN */

.login-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top, rgba(75, 85, 99, 0.35), transparent 35%),
        linear-gradient(135deg, #0f172a, #111827);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wrapper {
    width: 100%;
    padding: 20px;
}

.login-card {
    max-width: 390px;
    margin: auto;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    text-align: center;
}

.login-logo-box {
    margin-bottom: 18px;
}

.login-logo {
    width: 140px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 14px;
    border: 1px solid #4b5563;
    background: #111827;
    padding: 10px;
    box-sizing: border-box;
}

.login-card h1 {
    margin: 0;
    font-size: 24px;
    color: #f9fafb;
}

.login-card p {
    margin: 8px 0 22px;
    color: #9ca3af;
    font-size: 14px;
}

.login-error {
    background: rgba(220, 38, 38, 0.15);
    color: #fecaca;
    border: 1px solid rgba(220, 38, 38, 0.45);
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 14px;
}

.form-group {
    text-align: left;
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #d1d5db;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    box-sizing: border-box;
    background: #111827;
    border: 1px solid #4b5563;
    color: #f9fafb;
    padding: 12px;
    border-radius: 10px;
    outline: none;
    font-size: 15px;
}

.form-group input:focus {
    border-color: #9ca3af;
}

.login-button {
    width: 100%;
    border: none;
    background: #d1d5db;
    color: #111827;
    padding: 12px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    font-size: 15px;
    transition: 0.2s ease;
}

.login-button:hover {
    background: #f9fafb;
}

.login-footer-text {
    margin-top: 18px;
    color: #6b7280;
    font-size: 12px;
}

/* DASHBOARD */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.dashboard-header h2 {
    margin: 0;
    font-size: 26px;
    color: #f9fafb;
}

.dashboard-header p {
    margin: 6px 0 0;
    color: #9ca3af;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.dashboard-card {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
    transition: 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    border-color: #4b5563;
}

.dashboard-card h3 {
    margin: 0;
    font-size: 17px;
    color: #f9fafb;
}

.dashboard-card p {
    margin: 12px 0 4px;
    font-size: 34px;
    font-weight: bold;
    color: #e5e7eb;
}

.dashboard-card span {
    display: block;
    color: #9ca3af;
    font-size: 13px;
    margin-bottom: 15px;
}

.dashboard-card a {
    display: inline-block;
    text-decoration: none;
    background: #d1d5db;
    color: #111827;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    transition: 0.2s ease;
}

.dashboard-card a:hover {
    background: #f9fafb;
}

.alert-card {
    border-color: rgba(245, 158, 11, 0.6);
}

.dashboard-panel {
    margin-top: 25px;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 16px;
    padding: 20px;
}

.dashboard-panel h3 {
    margin-top: 0;
    color: #f9fafb;
}

.dashboard-panel p {
    color: #d1d5db;
    line-height: 1.6;
}

.dashboard-action-btn {
    display: inline-block;
    background: #d1d5db;
    color: #111827;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
}

.dashboard-action-btn:hover {
    background: #f9fafb;
}

.table-container {
    margin-top: 20px;
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 14px;
    overflow: hidden;
}

.custom-table thead {
    background: #111827;
}

.custom-table th {
    padding: 14px;
    text-align: left;
    font-size: 13px;
    color: #d1d5db;
    border-bottom: 1px solid #374151;
}

.custom-table td {
    padding: 14px;
    border-bottom: 1px solid #374151;
    font-size: 14px;
    color: #f9fafb;
}

.custom-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.empty-table {
    text-align: center;
    color: #9ca3af;
    padding: 30px !important;
}

.stock-danger {
    color: #fca5a5 !important;
    font-weight: bold;
}

.status-active {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
}

.status-inactive {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
}

.table-btn {
    display: inline-block;
    text-decoration: none;
    background: #374151;
    color: #f9fafb;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 12px;
}

.table-btn:hover {
    background: #4b5563;
}